-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose.yml
160 lines (151 loc) · 3.58 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: "3.5"
services:
database:
container_name: db_postgres
restart: always
image: postgres:latest
ports:
- 5432:5432
env_file:
- .env
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
rabbitmq:
container_name: rabbitmq
restart: always
image: rabbitmq:latest
ports:
- 5672:5672
- 15672:15672
env_file:
- .env
volumes:
- rabbitmq_data:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
mongo:
container_name: mongo
restart: always
image: mongo:latest
env_file:
- .env
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
- MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE}
ports:
- 27017:27017
volumes:
- mongo_data:/data/db
solr:
container_name: solr
restart: always
image: bitnami/solr:9.1.1
ports:
- 8983:8983
env_file:
- .env
environment:
# core setup
- SOLR_CORES=activity,budget,dataset,organisation,publisher,result,transaction
# There is a SOLR_CORE_CONF_DIR available but currently only allows 1 config, we need 1 per core.
- SOLR_OPTS=-Xms${MEM_SOLR_MIN}g -Xmx${MEM_SOLR_MAX}g
# Authentication
- SOLR_ENABLE_AUTHENTICATION=yes
- SOLR_ADMIN_USERNAME=${SOLR_ADMIN_USERNAME}
- SOLR_ADMIN_PASSWORD=${SOLR_ADMIN_PASSWORD}
volumes:
# Mount the image's solr_mount_dir to the local solr_mount_dir
- solr_data:/bitnami
iaticloud:
container_name: iaticloud
restart: always
build: .
image: iaticloud/main
env_file:
- .env
command: python manage.py runserver 0.0.0.0:8000
volumes:
# Mount the local project directory to the container's /app directory
- ./:/app
- ./static:/static
depends_on:
- database
- rabbitmq
- mongo
- solr
ports:
- 8000:8000
celeryworker:
container_name: celeryworker
image: iaticloud/main
volumes:
- ./:/app
env_file:
- .env
command: celery -A iaticloud worker -l INFO
depends_on:
- rabbitmq
- database
- iaticloud
celeryrevokeworker:
container_name: celeryrevokeworker
image: iaticloud/main
volumes:
- ./:/app
env_file:
- .env
command: celery -A iaticloud worker -l INFO -n revoke@%%h -Q revoke_queue
depends_on:
- rabbitmq
- database
- iaticloud
celeryscheduler:
container_name: celeryscheduler
image: iaticloud/main
volumes:
- ./:/app
env_file:
- .env
command: celery -A iaticloud beat -l INFO
depends_on:
- celeryworker
- database
- rabbitmq
- iaticloud
celeryflower:
container_name: celeryflower
image: iaticloud/main
volumes:
- ./:/app
env_file:
- .env
command: celery -A iaticloud flower -l INFO --port=5555 --basic_auth=${CELERYFLOWER_USER}:${CELERYFLOWER_PASSWORD}
depends_on:
- celeryworker
- celeryrevokeworker
- celeryscheduler
- database
- rabbitmq
- iaticloud
ports:
- 5555:5555
volumes:
db_data:
rabbitmq_data:
mongo_data:
solr_data: