-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
189 lines (174 loc) · 4.58 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
189 lines (174 loc) · 4.58 KB
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
178
179
180
181
182
183
184
185
186
187
188
189
services:
postgres:
build:
context: .
dockerfile: ./compose/postgres/Dockerfile
image: mindlogger_postgres
container_name: mindlogger_postgres
environment:
POSTGRES_HOST: ${DATABASE__HOST}
POSTGRES_PORT: ${DATABASE__PORT}
POSTGRES_PASSWORD: ${DATABASE__PASSWORD}
POSTGRES_USER: ${DATABASE__USER}
POSTGRES_DB: ${DATABASE__DB}
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
postgres-arb:
build:
context: .
dockerfile: ./compose/postgres/Dockerfile
image: mindlogger_postgres_arb
container_name: mindlogger_postgres_arb
environment:
POSTGRES_HOST: ${DATABASE__HOST}
POSTGRES_PORT: 65432
POSTGRES_PASSWORD: ${DATABASE__PASSWORD}
POSTGRES_USER: ${DATABASE__USER}
POSTGRES_DB: ${DATABASE__DB}
ports:
- "65432:65432"
volumes:
- pg_arb_data:/var/lib/postgresql/data
rabbitmq:
image: rabbitmq:3-management
container_name: mindlogger_rabbitmq
ports:
- "5672:5672"
- "15672:15672"
redis:
image: redis
container_name: mindlogger_redis
ports:
- "6379:6379"
app:
stdin_open: true
tty: true
image: mindlogger_backend
container_name: mindlogger_backend
build:
context: .
dockerfile: ./compose/fastapi/Dockerfile
entrypoint: /fastapi-entrypoint
command: /start-backend-datadog
env_file: .env
environment:
DATABASE__HOST: postgres
REDIS__HOST: redis
MAILING__MAIL__SERVER: mailhog
RABBITMQ__URL: rabbitmq
depends_on:
- postgres
- redis
- rabbitmq
- mailhog
ports:
- "8000:80"
develop:
watch:
- action: sync
path: .
target: /app
# Exclude the project virtual environment
ignore:
- .venv/
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml
worker:
build:
context: .
dockerfile: ./compose/fastapi/Dockerfile
image: mindlogger_worker
container_name: mindlogger_worker
entrypoint: /fastapi-entrypoint
command: ['/start-worker']
env_file: .env
environment:
DATABASE__HOST: postgres
REDIS__HOST: redis
MAILING__MAIL__SERVER: mailhog
RABBITMQ__URL: rabbitmq
develop:
watch:
- action: sync
path: .
target: /app
# Exclude the project virtual environment
ignore:
- .venv/
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml
depends_on:
- postgres
- redis
- rabbitmq
- mailhog
scheduler:
build:
context: .
dockerfile: ./compose/fastapi/Dockerfile
image: mindlogger_scheduler
container_name: mindlogger_scheduler
entrypoint: /fastapi-entrypoint
command: ['/start-scheduler']
env_file: .env
environment:
DATABASE__HOST: postgres
REDIS__HOST: redis
MAILING__MAIL__SERVER: mailhog
RABBITMQ__URL: rabbitmq
develop:
watch:
- action: sync
path: .
target: /app
# Exclude the project virtual environment
ignore:
- .venv/
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml
depends_on:
- postgres
- redis
- rabbitmq
mailhog:
image: mailhog/mailhog:v1.0.0
container_name: mindlogger_mailhog
ports:
- "8025:8025"
- "1025:1025"
minio:
image: minio/minio
container_name: mindlogger_minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioaccess
MINIO_ROOT_PASSWORD: miniosecret
volumes:
- datastore:/data
command: server --console-address ":9001" /data
createbuckets:
image: minio/mc
container_name: mindlogger_minio_mc
environment:
CDN__BUCKET: "${CDN__BUCKET:-cmi-media-local}"
CDN__BUCKET_ANSWER: "${CDN__BUCKET_ANSWER:-cmi-answer-local}"
CDN__BUCKET_OPERATIONS: "${CDN__BUCKET_OPERATIONS:-cmi-ops-local}"
CDN__BUCKET_OVERRIDE: "${CDN__BUCKET_OVERRIDE:-cmi-media-local-dr}"
CDN__BUCKET_ANSWER_OVERRIDE: "${CDN__BUCKET_ANSWER_OVERRIDE:-cmi-answer-local-dr}"
CDN__BUCKET_OPERATIONS_OVERRIDE: "${CDN__BUCKET_OPERATIONS_OVERRIDE:-cmi-ops-local-dr}"
depends_on:
- minio
volumes:
- './compose/minio:/etc/minio'
entrypoint: /etc/minio/create_bucket.sh
volumes:
pg_data: {}
pg_arb_data: {}
datastore: {}