- commit
- ab6321f
- parent
- 701e8da
- author
- Eric Bower
- date
- 2024-04-22 14:28:46 +0000 UTC
chore: update readme
+19,
-76
1@@ -1,83 +1,26 @@
2-# pico services
3+# pico.sh - hacker labs
4
5-Read our docs at [pico.sh](https://pico.sh).
6-
7-## development
8-
9-- `golang` >= 1.22.0
10-- `direnv` to load environment vars
11-
12-```bash
13-cp ./.env.example .env
14-```
15-
16-Initialize local env variables using direnv
17-
18-```bash
19-echo dotenv > .envrc && direnv allow
20-```
21-
22-Boot up database
23-
24-```bash
25-docker compose up -f docker-compose.yml -f docker-compose.override.yml --profile db -d
26-```
27-
28-Create db and migrate
29-
30-```bash
31-make create
32-make migrate
33-```
34-
35-Build services
36+Open source and managed services leveraging SSH.
37
38-```bash
39-make build
40-```
41+The secret ingredient to all our services is how we let users
42+publish changes to their blog and sites without needing to install anything.
43+We accomplish this with what is colloquially termed SSH Apps. By using
44+the SSH protocol and golang's implementation of SSH, we can create
45+golang binaries that interface with SSH in unique ways.
46
47-All services are built inside the `./build` folder.
48+Want to publish a blog post? Use rsync, scp, or sftp. Want to publish a
49+website? Use rsync, scp, or sftp. Want to share a code snippet with a
50+colleague? Use rsync, scp, or sftp. Hopefully you see the trend.
51
52-If you want to start prose execute these binaries from the project root directory:
53+- pgs.sh: A static site hosting platform using SSH.
54+- tuns.sh: HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
55+- imgs.sh: Docker image registry using SSH for authentication.
56+- prose.sh: A blog platform using SSH for content management.
57+- pastes.sh: Upload code snippets using SSH.
58+- feeds.sh: An RSS email notification system using SSH.
59
60-```bash
61-./build/prose-web
62-# in a separate terminal
63-./build/prose-ssh
64-```
65-
66-
67-## deployment
68-
69-We use an image based deployment, so all of our images are uploaded to
70-[ghcr.io/picosh/pico](https://github.com/picosh/pico/packages)
71-
72-```bash
73-DOCKER_TAG=latest make bp-all
74-```
75-
76-Once images are built, docker compose is used to stand up the services:
77-
78-```bash
79-docker compose up -d
80-```
81-
82-This makes use of a production `.env.prod` environment file which defines
83-the various listening addresses and services that will be started. For production,
84-we add a `.envrc` containing the following:
85-
86-```bash
87-export COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml
88-export COMPOSE_PROFILES=services,caddy
89-```
90-
91-And symlink `.env` to `.env.prod`:
92-
93-```bash
94-ln -s .env.prod .env
95-```
96+Read our docs at [pico.sh](https://pico.sh).
97
98-This allows us to use docker-compose normally as we would in development.
99+## development
100
101-For any migrations, logging into the our database server, pulling the changes
102-to migrations and running `make latest` is all that is needed.
103+[Local setup](/dev.md)
A
dev.md
+79,
-0
1@@ -0,0 +1,79 @@
2+## development
3+
4+- `golang` >= 1.22.0
5+- `direnv` to load environment vars
6+
7+```bash
8+cp ./.env.example .env
9+```
10+
11+Initialize local env variables using direnv
12+
13+```bash
14+echo dotenv > .envrc && direnv allow
15+```
16+
17+Boot up database
18+
19+```bash
20+docker compose up -f docker-compose.yml -f docker-compose.override.yml --profile db -d
21+```
22+
23+Create db and migrate
24+
25+```bash
26+make create
27+make migrate
28+```
29+
30+Build services
31+
32+```bash
33+make build
34+```
35+
36+All services are built inside the `./build` folder.
37+
38+If you want to start prose execute these binaries from the project root directory:
39+
40+```bash
41+./build/prose-web
42+# in a separate terminal
43+./build/prose-ssh
44+```
45+
46+
47+## deployment
48+
49+We use an image based deployment, so all of our images are uploaded to
50+[ghcr.io/picosh/pico](https://github.com/picosh/pico/packages)
51+
52+```bash
53+DOCKER_TAG=latest make bp-all
54+```
55+
56+Once images are built, docker compose is used to stand up the services:
57+
58+```bash
59+docker compose up -d
60+```
61+
62+This makes use of a production `.env.prod` environment file which defines
63+the various listening addresses and services that will be started. For production,
64+we add a `.envrc` containing the following:
65+
66+```bash
67+export COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml
68+export COMPOSE_PROFILES=services,caddy
69+```
70+
71+And symlink `.env` to `.env.prod`:
72+
73+```bash
74+ln -s .env.prod .env
75+```
76+
77+This allows us to use docker-compose normally as we would in development.
78+
79+For any migrations, logging into the our database server, pulling the changes
80+to migrations and running `make latest` is all that is needed.