-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
52 lines (48 loc) · 1.05 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
version: '3.7'
services:
tracker:
build: .
restart: unless-stopped
command: daphne -b 0.0.0.0 -p 8000 devsite.asgi:application
env_file:
./.env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/tracker/"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
- static:/var/www/static
depends_on:
- db
webserver:
image: nginx:alpine
container_name: webserver
restart: unless-stopped
tty: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/tracker/"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- static:/var/www/static
ports:
- "8000:80"
- "443:443"
depends_on:
- tracker
db:
image: postgres:12-alpine
volumes:
- db_data:/var/lib/postgresql
environment:
- POSTGRES_USER=tracker
- POSTGRES_PASSWORD=deadbeef
- POSTGRES_DB=donations
volumes:
static:
db_data: