-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
86 lines (79 loc) · 1.79 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
78
79
80
81
82
83
84
85
86
secrets:
SecretKey:
file: docker/secret_key.txt
DBPassword:
file: docker/db_password.txt
networks:
default:
driver: bridge
services:
postgres:
image: postgis/postgis:11-2.5
networks:
- default
environment:
- POSTGRES_USER=aol
- POSTGRES_PASSWORD=aol
- POSTGRES_DB=aol
volumes:
- ${VOLUME_PATH}/postgres/11/main:/var/lib/postgresql/data
- ${VOLUME_PATH}/dumps:/archive
rabbitmq:
image: rabbitmq:3-alpine
networks:
- default
volumes:
- ${VOLUME_PATH}/rabbitmq:/var/lib/rabbitmq
# override hostname to prevent reinitialization of data
# on container delete/init cycle.
# Refs: https://github.com/docker-library/rabbitmq/issues/106#issuecomment-241882358
hostname: 'rabbitmq-dev'
user: '${USER_ID}'
app:
build:
context: .
dockerfile: docker/Dockerfile
args:
- APP_USER_ID=${USER_ID}
- APP_GROUP_ID=${GROUP_ID}
environment:
- EMCEE_CMD_ENV=docker
- APP_SERVICE=wsgi
networks:
- default
ports:
- 8000:8000
volumes:
- /etc/localtime:/etc/localtime:ro
- ${VOLUME_PATH}/media:/media
- ${VOLUME_PATH}/static:/static
- ./:/app
depends_on:
- postgres
- rabbitmq
secrets:
- SecretKey
- DBPassword
user: '${USER_ID}'
celery:
build:
context: .
dockerfile: docker/Dockerfile
args:
- APP_USER_ID=${USER_ID}
- APP_GROUP_ID=${GROUP_ID}
environment:
- EMCEE_CMD_ENV=docker
- APP_SERVICE=celery
networks:
- default
volumes:
- /etc/localtime:/etc/localtime:ro
- ${VOLUME_PATH}/media:/media
- ./:/app
depends_on:
- app
secrets:
- SecretKey
- DBPassword
user: '${USER_ID}'