-
Notifications
You must be signed in to change notification settings - Fork 42
/
docker-compose.yml
executable file
·177 lines (172 loc) · 4.73 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
172
173
174
175
176
177
version: '3.4'
volumes:
server-db-OasisData:
celery-db-OasisData:
filestore-OasisData:
x-server-env: &server-env
OASIS_DEBUG: ${DEBUG:-0}
OASIS_URL_SUB_PATH: 0
OASIS_CELERY_BROKER_URL: "amqp://rabbit:rabbit@broker:5672"
OASIS_SERVER_DB_HOST: server-db
OASIS_SERVER_DB_PASS: oasis
OASIS_SERVER_DB_USER: oasis
OASIS_SERVER_DB_NAME: oasis
OASIS_SERVER_DB_PORT: 5432
OASIS_SERVER_CHANNEL_LAYER_HOST: channel-layer
OASIS_SERVER_DB_ENGINE: django.db.backends.postgresql_psycopg2
OASIS_CELERY_DB_ENGINE: db+postgresql+psycopg2
OASIS_CELERY_DB_HOST: celery-db
OASIS_CELERY_DB_PASS: password
OASIS_CELERY_DB_USER: celery
OASIS_CELERY_DB_NAME: celery
OASIS_CELERY_DB_PORT: 5432
OASIS_INPUT_GENERATION_CONTROLLER_QUEUE: task-controller # older setting (before 2.3.1)
OASIS_LOSSES_GENERATION_CONTROLLER_QUEUE: task-controller # older setting (before 2.3.1)
OASIS_TASK_CONTROLLER_QUEUE: task-controller # New option v2.3.1+
x-worker-env: &worker-env
OASIS_DEBUG: ${DEBUG:-0}
OASIS_CELERY_BROKER_URL: "amqp://rabbit:rabbit@broker:5672"
OASIS_CELERY_DB_ENGINE: db+postgresql+psycopg2
OASIS_CELERY_DB_HOST: celery-db
OASIS_CELERY_DB_PASS: password
OASIS_CELERY_DB_USER: celery
OASIS_CELERY_DB_NAME: celery
OASIS_CELERY_DB_PORT: 5432
# V1
OASIS_RABBIT_HOST: broker
OASIS_RABBIT_PORT: 5672
OASIS_RABBIT_USER: rabbit
OASIS_RABBIT_PASS: rabbit
x-volumes: &shared-volumes
- filestore-OasisData:/shared-fs:rw
services:
server:
restart: always
image: ${SERVER_IMG:-coreoasis/api_server}:${SERVER_TAG:-latest}
command: ["./wsgi/run-wsgi.sh"]
ports:
- 8000:8000
links:
- server-db
- celery-db
- broker
environment:
<<: *server-env
STARTUP_RUN_MIGRATIONS: "true"
OASIS_ADMIN_USER: admin
OASIS_ADMIN_PASS: password
volumes:
- filestore-OasisData:/shared-fs:rw
websocket:
restart: always
image: coreoasis/api_server:dev
image: ${SERVER_IMG:-coreoasis/api_server}:${SERVER_TAG:-latest}
command: ["./asgi/run-asgi.sh"]
links:
- server-db
- celery-db
- broker
ports:
- 8001:8001
environment:
<<: *server-env
volumes:
- filestore-OasisData:/shared-fs:rw
v1-worker-monitor:
restart: always
image: ${SERVER_IMG:-coreoasis/api_server}:${SERVER_TAG:-latest}
command: [celery, -A, src.server.oasisapi.celery_app_v1, worker, --loglevel=INFO, -Q, celery]
links:
- server-db
- celery-db
- broker
environment:
<<: *server-env
volumes:
- filestore-OasisData:/shared-fs:rw
v2-worker-monitor:
restart: always
image: ${SERVER_IMG:-coreoasis/api_server}:${SERVER_TAG:-latest}
command: [celery, -A, src.server.oasisapi.celery_app_v2, worker, --loglevel=INFO, -Q, celery-v2]
links:
- server-db
- celery-db
- broker
environment:
<<: *server-env
volumes:
- filestore-OasisData:/shared-fs:rw
task-controller:
restart: always
image: ${SERVER_IMG:-coreoasis/api_server}:${SERVER_TAG:-latest}
command: [celery, -A, src.server.oasisapi.celery_app_v2, worker, --loglevel=INFO, -Q, task-controller]
links:
- server-db
- celery-db
- broker
environment:
<<: *server-env
volumes:
- filestore-OasisData:/shared-fs:rw
celery-beat:
restart: always
image: ${SERVER_IMG:-coreoasis/api_server}:${SERVER_TAG:-latest}
command: [celery, -A, src.server.oasisapi.celery_app_v2, beat, --loglevel=INFO]
links:
- server-db
- celery-db
- broker
environment:
<<: *server-env
volumes: *shared-volumes
worker:
restart: always
image: ${WORKER_IMG:-coreoasis/model_worker}:${WORKER_TAG:-latest}
links:
- celery-db
- broker:mybroker
environment:
<<: *worker-env
OASIS_MODEL_SUPPLIER_ID: OasisLMF
OASIS_MODEL_ID: PiWind
OASIS_MODEL_VERSION_ID: 1
OASIS_RUN_MODE: ${WORKER_API_VER:-v1}
volumes:
- ./:/home/worker/model
- filestore-OasisData:/shared-fs:rw
server-db:
restart: always
image: postgres
environment:
- POSTGRES_DB=oasis
- POSTGRES_USER=oasis
- POSTGRES_PASSWORD=oasis
volumes:
- server-db-OasisData:/var/lib/postgresql/data:rw
ports:
- 33307:3306
celery-db:
restart: always
image: postgres
environment:
- POSTGRES_DB=celery
- POSTGRES_USER=celery
- POSTGRES_PASSWORD=password
volumes:
- celery-db-OasisData:/var/lib/postgresql/data:rw
ports:
- 33306:5432
broker:
restart: always
image: rabbitmq:3.8.14-management
environment:
- RABBITMQ_DEFAULT_USER=rabbit
- RABBITMQ_DEFAULT_PASS=rabbit
ports:
- 5672:5672
- 15672:15672
channel-layer:
restart: always
image: redis:5.0.7
ports:
- 6379:6379