-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
98 lines (91 loc) · 2.1 KB
/
docker-compose.prod.yml
File metadata and controls
98 lines (91 loc) · 2.1 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
version: "3"
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- 80:80
- 443:443
volumes:
- ./server/:/var/www/server
- ./client/:/var/www/client/
- ./config/nginx:/etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt
links:
- server
- client
server:
build: ./server/
container_name: server
working_dir: /var/www/server
ports:
- $SERVER_PORT:$SERVER_PORT
volumes:
- ./server/:/var/www/server
- ./client/:/var/www/client/
command: gunicorn server.wsgi -c gunicorn.conf
env_file:
- .env
environment:
- DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
- PGHOST=$DATABASE_HOST
depends_on:
- database
- redis
- celery
database:
container_name: database
image: postgres:latest
volumes:
- ./initial.sql:/docker-entrypoint-initdb.d/initial.sql
client:
image: node:latest
container_name: client
working_dir: /var/www/client/
command: yarn start
ports:
- $CLIENT_PORT:$CLIENT_PORT
volumes:
- ./server/:/var/www/server
- ./client/:/var/www/client/
redis:
image: redis:latest
container_name: redis
ports:
- "$REDIS_PORT:$REDIS_PORT"
privileged: true
sysctls:
net.core.somaxconn: "511"
celery:
build:
context: ./server/
dockerfile: Dockerfile
container_name: celery
working_dir: /var/www/server
volumes:
- ./server/:/var/www/server
command: /bin/bash -c "celery -A server worker --loglevel=info"
depends_on:
- redis
- database
env_file:
- .env
environment:
- DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
- PGHOST=$DATABASE_HOST
monitor:
build:
context: ./server/
dockerfile: Dockerfile
container_name: monitor
working_dir: /var/www/server
volumes:
- ./server/:/var/www/server
command: /bin/bash -c "flower -A server --port=$FLOWER_PORT"
env_file:
- .env
depends_on:
- celery
- redis
ports:
- $FLOWER_PORT:$FLOWER_PORT