-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-deploy.yml
85 lines (64 loc) · 1.44 KB
/
docker-compose-deploy.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
75
76
77
78
79
80
81
82
83
84
85
version: '3.7'
services:
django: &django
build:
context: .
dockerfile: docker/python/deploy/Dockerfile
entrypoint: /scripts/web_entrypoint.sh
command: gunicorn -w 4 sNeeds.wsgi -b 0.0.0.0:8000
environment:
SECRET_KEY: ${SECRET_KEY}
DJANGO_DEPLOYMENT: 1
#TODO: Make this implemented
DJANGO_SETTINGS_MODULE: sNeeds.settings.deployment # Used by gunicorn
#DB config
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_HOST_IP: ${DB_HOST_IP}
DB_HOST_PORT: 5432
volumes:
- ./code:/code
- static_files:/static_files
ports:
- 8000:8000
networks:
- backend
- backend-internal-network
tty: true
depends_on:
- redis
- celery
celery:
<<: *django
command: bash -c "celery -A sNeeds worker --loglevel=info && celery -A sNeeds beat --loglevel=info"
ports: []
entrypoint: []
depends_on:
- redis
nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
networks:
- backend
- backend-internal-network
volumes:
- static_files:/static_files
depends_on:
- django
ports:
- 8080:80
redis:
image: redis:5.0.5-alpine
ports:
- 6379:6379
networks:
- backend-internal-network
networks:
backend-internal-network:
driver: overlay
internal: true
backend:
volumes:
static_files: