-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (55 loc) · 1.09 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
version: '3.4'
services:
db:
image: postgres:14
restart: always
environment:
- POSTGRES_DB=medrec
- POSTGRES_PASSWORD=medrec_password
- POSTGRES_USER=db_user
volumes:
- psqldata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "db_user", "-d", "medrec"]
interval: 10s
timeout: 60s
retries: 5
start_period: 10s
test:
build: .
command: ['pytest']
depends_on:
db:
condition: service_healthy
env_file:
- .env
web:
build: .
command: sh ./deploy/entrypoint.sh
depends_on:
db:
condition: service_healthy
test:
condition: service_completed_successfully
restart: on-failure
volumes:
- media:/app/media:rw
- static:/app/static:rw
env_file:
- .env
ports:
- 8000:8000
nginx:
image: nginx
volumes:
- ./deploy/web.conf:/etc/nginx/conf.d/default.conf:ro
- media:/media:ro
- static:/static:ro
ports:
- 80:80
depends_on:
- web
volumes:
media:
static:
psqldata: