-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (51 loc) · 1.15 KB
/
docker-compose.yaml
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
52
53
version: "3.6"
services:
db:
image: timescale/timescaledb:latest-pg13
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
api:
build: ./api
command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --root-path /api --reload
volumes:
- ./api:/api
environment:
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@db:5432/${DB_NAME}
depends_on:
- db
web:
build: ./web
environment:
- DOMAIN_NAME=${DOMAIN_NAME}
- WEB_PORT=${WEB_PORT}
volumes:
- ./web/src:/app/src
- ./web/ws.js:/app/ws.js
depends_on:
- api
caddy:
image: mwath/dodobox-caddy:v1
command: caddy run
volumes:
- caddy_data:/data
- caddy_config:/config
environment:
- WEB_PORT=${WEB_PORT}
- DOMAIN_NAME=${DOMAIN_NAME}
- ACME_APIKEY=${ACME_APIKEY}
ports:
- "${WEB_PORT}:${WEB_PORT}"
- "${WEB_PORT_HTTP}:80"
depends_on:
- api
- web
volumes:
postgres_data: {}
caddy_data: {}
caddy_config: {}