-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
52 lines (49 loc) · 1.06 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
52 lines (49 loc) · 1.06 KB
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
services:
web:
build:
context: ./app
dockerfile: Dockerfile
expose:
- 8000
env_file:
- .env.prod
restart: unless-stopped
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/app/staticfiles
depends_on:
db:
condition: service_healthy
db:
image: postgres
restart: unless-stopped
shm_size: 128mb
env_file:
- .env.prod
volumes:
- db_data:/var/lib/postgresql
healthcheck:
test: "PGPASSWORD=${POSTGRES_PASSWORD} pg_isready -h 127.0.0.1 -U ${POSTGRES_USER} -d ${POSTGRES_DB} -p ${POSTGRES_PORT}"
interval: 15s
timeout: 5s
retries: 5
nginx:
build: ./nginx
restart: unless-stopped
ports:
- 1337:80
volumes:
- static_volume:/app/staticfiles
depends_on:
- web
tunnel:
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
- TUNNEL_TOKEN=${CF_TOKEN}
depends_on:
- nginx
volumes:
db_data:
static_volume: