-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
162 lines (153 loc) · 3.23 KB
/
docker-compose.yaml
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
version: '3.4'
x-common-variables: &common-variables
CELERY_BROKER_URL: redis://redis:6379
CELERY_RESULT_BACKEND: redis://redis:6379
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_URL: minio:9000
MINIO_BUCKET_NAME: hse-api-bucket
MYSQL_HOST: mysql
MYSQL_ROOT_PASSWORD: mysql123
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql123
MYSQL_DATABASE: hse-api-database
RESTRICTED_MODE: 0
services:
hse-api-web:
image: hseling/hseling-api-direct-speech:latest #hseling-api-direct-speech-master_hse-api-web:latest
ports:
- "80:80"
links:
- redis
- minio
- mysql
- hse-api-celery
environment: *common-variables
hse-api-celery:
image: hseling/hseling-api-direct-speech:latest #hseling-api-direct-speech-master_hse-api-celery:latest
command: celery -A main.celery worker
links:
- redis
- minio
- mysql
environment: *common-variables
minio:
image: minio/minio:latest
volumes:
- data:/data
ports:
- "9000:9000"
command: server /data/minio
environment: *common-variables
mysql:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment: *common-variables
redis:
image: redis:latest
# Development related
db:
env_file: environment.env
build:
context: .
dockerfile: ./docker/db/Dockerfile
args:
# These values should be in sync with environment.env
# for development. If you change them, you'll
# need to rebuild the container
- POSTGRES_DB=templatesitedb
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=somepassword
- POSTGRES_PORT=5432
# Remember to keep this consistent
- django_secret_key=secret_key!
log:
env_file: environment.env
build:
context: .
dockerfile: ./docker/log/Dockerfile
metrics:
build:
context: .
dockerfile: ./docker/metrics/Dockerfile
ports:
- "9090:9090"
metrics-graph:
image: grafana/grafana
ports:
- "3000:3000"
depends_on:
- metrics
build-deps:
env_file: environment.env
build:
context: .
dockerfile: ./docker/deps/Dockerfile
volumes:
- ./vendor:/opt/ext_vendor
command: /opt/copy_deps.sh
dev-server:
env_file: environment.env
environment:
- CONSOLE_LOGS=1
build:
context: .
args:
# Remember to keep this consistent
- django_secret_key=secret_key!
command: ./start_dev_server.sh
ports:
- "8000:80"
volumes:
- ./src:/opt/code
depends_on:
- db
- log
- hse-api-web
- hse-api-celery
test:
env_file: environment.env
environment:
- CONSOLE_LOGS=1
build:
context: .
args:
# Remember to keep this consistent
- django_secret_key=secret_key!
entrypoint: pytest
volumes:
- ./src:/opt/code
depends_on:
- db
- build-deps
system-test:
env_file: environment.env
build:
context: .
dockerfile: ./docker/system-test/Dockerfile
entrypoint: pytest
volumes:
- ./system-test:/opt/system-test
depends_on:
- server
# Producion related
server:
image: templatesite
env_file: environment.env
build:
context: .
args:
# Remember to keep this consistent
- django_secret_key=secret_key!
command: /opt/server/start_server.sh
ports:
- "8080:80"
depends_on:
- db
- log
- metrics
- hse-api-web
- hse-api-celery
volumes:
data: