-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
79 lines (69 loc) · 1.67 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: '2'
services:
web: &web
restart: always
build: .
expose:
- "8000"
links:
- postgres:postgres
- redis:redis
env_file: env
volumes:
- ./:/data/web
- ./sequences:/sequences
# - /var/run/docker.sock:/var/run/docker.sock # send docker commands from the django docker container
environment:
- POSTGRES_USER=myproject_web
- USE_DOCKER=yes
- DOCKER_SOCKET=/var/run/docker.sock
- DOCKER_GROUP=dockerhost
- DOCKER_HOST=unix:///var/run/docker.sock
ports:
- "8000"
command: /bin/bash -c "gunicorn config.wsgi:application -w 4 -b :8000 -t 3600"
nginx:
restart: always
build: ./nginx/
ports:
- "80:80"
volumes_from:
- web
links:
- web:web
postgres:
restart: always
image: postgres:9.6
volumes:
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./backups/postgresql:/backup
- ./postgres-data:/var/lib/postgresql/data
env_file:
- env
expose:
- "5432"
redis:
image: redis:3.0
celeryworker:
# https://github.com/docker/compose/issues/3220
<<: *web
depends_on:
- redis
- postgres
command: ./worker_launcher.sh
celerybeat:
# https://github.com/docker/compose/issues/3220
<<: *web
depends_on:
- redis
- postgres
ports: []
command: celery -A olc_webportalv2.taskapp beat -l info
flower:
<<: *web
depends_on:
- celeryworker
- celerybeat
command: ["flower", "--basic_auth=$FLOWER_USER:$FLOWER_PASSWORD","--broker=redis://redis:6379/0", "--port=8888"]
ports:
- 8888:8888