-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-test.yml
101 lines (91 loc) · 2.38 KB
/
docker-compose-test.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: '2'
services:
web: &web
restart: always
build:
context: .
dockerfile: Dockerfile.dev
expose:
- "8000"
links:
- postgres:postgres
- redis:redis
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
- SECRET_KEY=asdfjkl
- AZURE_ACCOUNT_NAME=$AZURE_ACCOUNT_NAME
- AZURE_ACCOUNT_KEY=$AZURE_ACCOUNT_KEY
- BATCH_ACCOUNT_NAME=$BATCH_ACCOUNT_NAME
- BATCH_ACCOUNT_URL=$BATCH_ACCOUNT_URL
- BATCH_ACCOUNT_KEY=$BATCH_ACCOUNT_KEY
- EMAIL_HOST_USER=$EMAIL_HOST_USER
- EMAIL_HOST_PASSWORD=$EMAIL_HOST_PASSWORD
- VM_IMAGE=$VM_IMAGE
- VM_CLIENT_ID=$VM_CLIENT_ID
- VM_SECRET=$VM_SECRET
- VM_TENANT=$VM_TENANT
- DB_NAME=project_db
- DB_USER=project_user
- DB_PASS=fakepassword
- DB_SERVICE=postgres
- DB_PORT=5432
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
environment:
- DB_NAME=project_db
- DB_USER=project_user
- DB_PASS=fakepassword
- DB_SERVICE=postgres
- DB_PORT=5432
volumes:
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./backups/postgresql:/backup
- ./postgres-data-test:/var/lib/postgresql/data
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: /start-celerybeat.sh
flower:
<<: *web
depends_on:
- celeryworker
- celerybeat
command: ["flower", "--basic_auth=$FLOWER_USER:$FLOWER_PASSWORD","--broker=redis://redis:6379/0", "--port=8888"]
ports:
- 8888:8888