-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (56 loc) · 1.5 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: "3.9"
services:
api:
build: api/.
image: etzi-api
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.app-http.rule=Host(`api.etzi.eus`)
- traefik.http.routers.app-http.tls=true
- traefik.http.routers.app-http.tls.certresolver=letsencrypt
expose:
- "8000"
environment:
POSTGRES_IP: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: $${POSTGRES_PASSWORD:?err}
POSTGRES_DB: etzi
API_JWT_SECRET_KEY: $${API_JWT_SECRET_KEY:?err}
FIREBASE_CREDENTIALS: ${API_FIREBASE_CREDENTIALS}
IMAGES_PATH: /etzi/images
volumes:
- "/root/etzi/api/images:/etzi/images"
- "${CREDENTIALS_FOLDER}:${API_CREDENTIALS_FOLDER}"
depends_on:
postgres:
condition: service_healthy
postgres:
build: db/.
image: postgres-db
restart: always
user: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: $${POSTGRES_PASSWORD:?err}
POSTGRES_DB: etzi
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- db:/var/lib/postgresql/data
traefik:
image: traefik:latest
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- $PWD/services/traefik/traefik.toml:/etc/traefik/traefik.toml
- traefik-public-certificates:/certificates
volumes:
db:
traefik-public-certificates: