repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
bf4d03e
parent
fcf7112
author
Antonio Mika
date
2022-08-02 22:56:04 +0000 UTC
Update readme with information about new deployment method
1 files changed,  +22, -6
M README.md
+22, -6
 1@@ -26,7 +26,7 @@ cp ./.env.example .env
 2 Boot up database
 3 
 4 ```bash
 5-docker compose up -d
 6+docker compose up --profile db -d
 7 ```
 8 
 9 Create db and migrate
10@@ -61,12 +61,28 @@ We use an image based deployment, so all of our images are uploaded to
11 DOCKER_TAG=latest make bp-all
12 ```
13 
14-Then ssh into the production server and run:
15+Once images are built, docker compose is used to stand up the services:
16+
17+```bash
18+docker compose up -d
19+```
20+
21+This makes use of a production `.env.prod` environment file which defines
22+the various listening addresses and services that will be started. For production,
23+we add a `.envrc` containing the following:
24 
25 ```bash
26-./start.sh pull
27-./start.sh
28+export COMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml
29+export COMPOSE_PROFILES=services,caddy
30 ```
31 
32-For any migrations, right dropping into `psql` on our production database and
33-pasting the SQL.  This process is a WIP and will update over time.
34+And symlink `.env` to `.env.prod`:
35+
36+```bash
37+ln -s .env.prod .env
38+```
39+
40+This allows us to use docker-compose normally as we would in development.
41+
42+For any migrations, logging into the our database server, pulling the changes
43+to migrations and running `make latest` is all that is needed.