-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (79 loc) · 2.02 KB
/
docker-compose.yml
File metadata and controls
85 lines (79 loc) · 2.02 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
version: "3"
services:
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: python manage.py runserver 0.0.0.0:$SERVER_PORT
environment:
- DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
- PGHOST=$DATABASE_HOST
env_file:
- .env
depends_on:
- database
- redis
- celery
database:
container_name: database
image: postgres:latest
volumes:
- ./initial.sql:/docker-entrypoint-initdb.d/initial.sql
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
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'