-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
171 lines (171 loc) · 5.28 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
161
162
163
164
165
166
167
168
169
170
171
version: '3'
services:
reverse_proxy:
build:
context: ./
target: nginx
args:
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
container_name: rama-scene-nginx
depends_on:
- webapp
environment:
NGINX_BACKEND_HOST: webapp
NGINX_BACKEND_PORT: 8000
NGINX_CONF_INCLUDE: conf.d/ramascene_vhost.conf
NGINX_VHOST_PRESET: django
ports:
- 80:80
restart: unless-stopped
webapp:
build:
context: ./
target: python
args:
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
container_name: rama-scene-daphne
depends_on:
- cache
- message_broker
environment:
DEBUG: $DEBUG
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
ports:
- 8000:8000
restart: unless-stopped
volumes:
- .:/mnt/data
- ../datasets:/mnt/datasets:ro
analyser:
build:
context: ./
target: python
args:
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
OPENBLAS_NUM_THREADS: 1
command: ["celery", "-A", "ramasceneMasterProject", "worker", "-l", "info", "--concurrency", "1", "--max-tasks-per-child", "1", "--queue", "calc_default", "-n", "worker1.%h"]
container_name: rama-scene-analyser
depends_on:
- cache
- message_broker
environment:
DEBUG: $DEBUG
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
OPENBLAS_NUM_THREADS: 2
restart: unless-stopped
volumes:
- .:/mnt/data
- ../datasets:/mnt/datasets:ro
modeller:
build:
context: ./
target: python
args:
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
OPENBLAS_NUM_THREADS: 1
command: ["celery", "-A", "ramasceneMasterProject", "worker", "-l", "info", "--concurrency", "1", "--max-tasks-per-child", "1", "--queue", "modelling", "-n", "worker2.%h"]
container_name: rama-scene-modeller
depends_on:
- cache
- message_broker
environment:
DEBUG: $DEBUG
DJANGO_SETTINGS_MODULE: $DJANGO_SETTINGS_MODULE
PUBLIC_DIR: public
HOST: www.ramascene.eu
WS_HOST: www.ramascene.eu
PROTOCOL: http
WS_PROTOCOL: ws
BROKER_URL: amqp://$RABBITMQ_USERNAME:$RABBITMQ_PASSWORD@message_broker:5672/$RABBITMQ_VHOST
REDIS_HOST: cache
SECRET_KEY: $SECRET_KEY
DATABASE_NAME: $DATABASE_NAME
DATASETS_VERSION: $DATASETS_VERSION
OPENBLAS_NUM_THREADS: 1
restart: unless-stopped
volumes:
- .:/mnt/data
- ../datasets:/mnt/datasets:ro
message_broker:
image: rabbitmq:3.9.11-management-alpine
container_name: rama-scene-rabbitmq
environment:
HOSTNAME: 'rabbitmq'
RABBITMQ_DEFAULT_PASS: $RABBITMQ_PASSWORD
RABBITMQ_DEFAULT_USER: $RABBITMQ_USERNAME
RABBITMQ_DEFAULT_VHOST: $RABBITMQ_VHOST
hostname: 'rabbitmq'
ports:
- 5672:5672
- 15672:15672
restart: unless-stopped
volumes:
- ramascene_rabbitmq:/var/lib/rabbitmq/mnesia/
cache:
image: redis:7.0-alpine
container_name: rama-scene-redis
ports:
- 6379:6379
restart: unless-stopped
volumes:
ramascene_rabbitmq: