forked from OasisLMF/OasisPlatform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
s3.docker-compose.yml
executable file
·159 lines (159 loc) · 4.78 KB
/
s3.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
version: '3'
services:
localstack-s3:
image: localstack/localstack:0.11.0
environment:
- SERVICES=s3
ports:
- "4567-4599:4567-4599"
volumes:
- ./tests/localstack/:/docker-entrypoint-initaws.d
server:
restart: always
image: coreoasis/api_server:latest
build:
context: .
dockerfile: Dockerfile.api_server
ports:
- 8000:8000
links:
- server-db
- celery-db
- rabbit
environment:
- OASIS_ADMIN_USER=admin
- OASIS_ADMIN_PASS=password
- OASIS_DEBUG=1
- OASIS_RABBIT_HOST=rabbit
- OASIS_RABBIT_PORT=5672
- OASIS_RABBIT_USER=rabbit
- OASIS_RABBIT_PASS=rabbit
- 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=3306
- OASIS_CELERY_DB_ENGINE=db+mysql+pymysql
- 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=3306
- OASIS_STORAGE_TYPE=S3
- OASIS_AWS_BUCKET_NAME=example-bucket
- OASIS_AWS_S3_ENDPOINT_URL=http://localstack-s3:4572
- OASIS_AWS_ACCESS_KEY_ID=foobar
- OASIS_AWS_SECRET_ACCESS_KEY=foobar
- STARTUP_RUN_MIGRATIONS=true
volumes:
- ${OASIS_MEDIA_ROOT:-./docker-shared-fs}:/shared-fs:rw
worker-monitor:
restart: always
image: coreoasis/api_server:latest
command: [wait-for-server, 'server:8000', celery, -A, src.server.oasisapi, worker, --loglevel=INFO]
links:
- server-db
- celery-db
- rabbit
environment:
- OASIS_DEBUG=1
- OASIS_RABBIT_HOST=rabbit
- OASIS_RABBIT_PORT=5672
- OASIS_RABBIT_USER=rabbit
- OASIS_RABBIT_PASS=rabbit
- 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=3306
- OASIS_CELERY_DB_ENGINE=db+mysql+pymysql
- 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=3306
- OASIS_STORAGE_TYPE=S3
- OASIS_AWS_BUCKET_NAME=example-bucket
- OASIS_AWS_ACCESS_KEY_ID=foobar
- OASIS_AWS_SECRET_ACCESS_KEY=foobar
- OASIS_AWS_S3_ENDPOINT_URL=http://localstack-s3:4572
volumes:
- ${OASIS_MEDIA_ROOT:-./docker-shared-fs}:/shared-fs:rw
worker:
restart: always
image: coreoasis/model_worker:latest
build:
context: .
dockerfile: Dockerfile.model_worker
links:
- celery-db
- rabbit:myrabbit
environment:
- OASIS_MODEL_SUPPLIER_ID=OasisLMF
- OASIS_MODEL_ID=PiWind
- OASIS_MODEL_VERSION_ID=1
- OASIS_RABBIT_HOST=rabbit
- OASIS_RABBIT_PORT=5672
- OASIS_RABBIT_USER=rabbit
- OASIS_RABBIT_PASS=rabbit
- OASIS_CELERY_DB_ENGINE=db+mysql+pymysql
- 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=3306
- OASIS_STORAGE_TYPE=S3
- OASIS_AWS_BUCKET_NAME=example-bucket
- OASIS_AWS_ACCESS_KEY_ID=foobar
- OASIS_AWS_SECRET_ACCESS_KEY=foobar
- OASIS_AWS_S3_ENDPOINT_URL=http://localstack-s3:4572
volumes:
- ${OASIS_MODEL_DATA_DIR:-./data/static}:/var/oasis/:rw
- ${OASIS_MEDIA_ROOT:-./docker-shared-fs}:/shared-fs:rw
server-db:
restart: always
image: mysql:8.0
command:
- --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=oasis
- MYSQL_PASSWORD=oasis
- MYSQL_DATABASE=oasis
volumes:
- ${OASIS_DOCKER_DB_DATA_DIR:-./db-data}/server:/var/lib/mysql/:rw
celery-db:
restart: always
image: mysql
command:
- --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=celery
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=celery
volumes:
- ${OASIS_DOCKER_DB_DATA_DIR:-./db-data}/celery:/var/lib/mysql/:rw
rabbit:
restart: always
image: rabbitmq:3-management
environment:
- RABBITMQ_DEFAULT_USER=rabbit
- RABBITMQ_DEFAULT_PASS=rabbit
ports:
- 5672:5672
- 15672:15672
flower:
restart: always
image: iserko/docker-celery-flower
ports:
- 5555:5555
environment:
- CELERY_BROKER_URL=amqp://rabbit:rabbit@rabbit:5672
entrypoint:
- flower
- --port=5555
- --broker_api=http://rabbit:rabbit@rabbit:15672/api/
links:
- celery-db
- rabbit