-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
51 lines (49 loc) · 1.61 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
services:
web:
build: ./dockers/caddy
restart: unless-stopped
ports:
- 443:443
volumes:
- type: bind
source: ./caddyfile.src.json
target: /etc/caddy/caddyfile.src.json
read_only: true
- type: bind
source: ./package.json
target: /srv/package.json
read_only: true
- type: bind
source: ./package-lock.json
target: /srv/package-lock.json
- ./node_modules:/srv/node_modules
- ./node_modules/htmx.org/dist:/usr/share/caddy/assets/js/htmx
- ./node_modules/hyperscript.org/dist:/usr/share/caddy/assets/js/hyperscript
- ./app/public:/usr/share/caddy
- ./app/migrations:/srv/db/migrations
- ./data/web:/data/caddy
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
- DB_ANON_ROLE=${DB_ANON_ROLE}
- DB_SCHEMA=${DB_SCHEMA}
- DATABASE_URL_ANON=postgres:/${DB_ANON_ROLE}@db:5432/${POSTGRES_DB}?sslmode=disable
db:
image: postgres:alpine
depends_on:
- web
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DB_ANON_ROLE=${DB_ANON_ROLE}
- DB_SCHEMA=${DB_SCHEMA}
volumes:
- ./data/db:/var/lib/postgresql/data
restart: unless-stopped
api:
image: postgrest/postgrest:latest
environment:
- PGRST_DB_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- PGRST_DB_SCHEMA=${DB_SCHEMA}
- PGRST_DB_ANON_ROLE=${DB_ANON_ROLE}
restart: unless-stopped