-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (59 loc) · 1.42 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
version: "3.5"
services:
nginx:
image: nginx:latest
container_name: nginx
restart: always
ports:
- 8080:8080
volumes:
- ./static/:/static/
- ./media/:/media/
- /var/log/webeloper-back/nginx/:/var/log/nginx/
- ./deploy/nginx:/etc/nginx/conf.d
depends_on:
- web
web:
build: .
container_name: web
restart: always
depends_on:
postgres:
condition: "service_healthy"
command: >
sh -c "
python ./manage.py migrate;
python ./manage.py setup_groups;
python ./manage.py collectstatic --noinput;
gunicorn --bind=0.0.0.0:8000 --timeout=90 --workers=6 --preload _base.wsgi:application;
"
volumes:
- .:/app/project-management-service/
- ./static/:/static
- ./media/:/media
- /var/log/project-management-service:/var/log/project-management-service
- cachedata:/cachec
ports:
- 8000:8000
env_file:
- .env
postgres:
restart: always
image: postgres:latest
volumes:
- ./media/:/media/
- dbdata:/var/lib/postgresql/data/
env_file:
- .env
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
dbdata:
cachedata: