-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
242 lines (226 loc) · 6.21 KB
/
local.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
version: "3"
volumes:
local_postgres14_data: {}
local_postgres14_data_backups: {}
local_postgres12_data: {}
local_postgres12_data_backups: {}
local_prometheus_data: {}
local_file_data: {}
local_octoprint_data: {}
local_nsc_data: {}
local_jetstream_data: {}
local_windmill_worker_dependency_cache: null
services:
janus:
hostname: janus
image: bitsyai/janus:1.0.4
container_name: printnanny_janus
ports:
- "9188:8188"
- "11188:7188"
- "11088:7088"
- "9088:8088"
- "5000-5100:5000-5100/udp"
env_file:
- ./.envs/.local/.janus
volumes:
- ./compose/local/janus/etc:/etc/janus
mailhog:
image: mailhog/mailhog:v1.0.0
container_name: printnanny_webapp_local_mailhog
ports:
- "8025:8025"
django: &django
hostname: django
stdin_open: true
tty: true
# network_mode: "host"
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: printnanny_webapp_local_django
container_name: printnanny_webapp_django
depends_on:
- postgres12
- prometheus
- cloud-nats
- janus
- mailhog
- redis
volumes:
- .:/app:z
- local_file_data:/tmp:z
- .envs/.local/key.json:/tmp/keys/keyfile.json:ro
# prevent host machine .venv and node_modules from being included in container
# idea from: https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
- /app/node_modules
- /app/.venv
- local_nsc_data:/var/lib/nats/nsc:z
environment:
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL}
NKEYS_PATH: /var/lib/nats/nsc/keys
NSC_HOME: /var/lib/nats/nsc
NSC_STORE: /var/lib/nats/nsc/stores
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
- ./.envs/.local/.secrets
ports:
- "8080:8080"
- "8001:8001"
command:
- /start
celeryworker:
<<: *django
image: printnanny_webapp_local_celeryworker
container_name: printnanny_webapp_local_celeryworker
depends_on:
- redis
- postgres12
- mailhog
ports: []
command: /start-celeryworker
celerybeat:
<<: *django
image: printnanny_webapp_local_celerybeat
container_name: printnanny_webapp_local_celerybeat
depends_on:
- redis
- postgres12
- mailhog
ports: []
command: /start-celerybeat
flower:
<<: *django
image: printnanny_webapp_local_flower
container_name: printnanny_webapp_local_flower
ports:
- "5555:5555"
command: /start-flower
firehose: &firehose
hostname: firehose
depends_on:
- postgres12
- cloud-nats
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: printnanny_webapp_local_django
container_name: printnanny_webapp_firehose
environment:
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL}
NKEYS_PATH: /var/lib/nats/nsc/keys
NSC_HOME: /var/lib/nats/nsc
NSC_STORE: /var/lib/nats/nsc/stores
DJANGO_SETTINGS_MODULE: config.settings.local
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
- ./.envs/.local/.secrets
volumes:
- .:/app:z
- local_nsc_data:/var/lib/nats/nsc:z
command:
- python
- -m
- print_nanny_webapp.events.streams.firehose
postgres12:
hostname: postgres12
image: postgres:12.3
container_name: printnanny_webapp_postgres12
volumes:
- local_postgres12_data:/var/lib/postgresql/data:z
- local_postgres12_data_backups:/backups:z
env_file:
- ./.envs/.local/.postgres
ports:
- "5432:5432"
# postgres14:
# hostname: postgres14
# image: postgres:14.6
# container_name: printnanny_webapp_postgres14
# volumes:
# - ./compose/local/windmill/init-db-as-superuser.sql:/docker-entrypoint-initdb.d/init-db-as-superuser.sql
# - local_postgres14_data:/var/lib/postgresql/data:z
# - local_postgres14_data_backups:/backups:z
# env_file:
# - ./.envs/.local/.windmill
# ports:
# - "5433:5432"
redis:
hostname: redis
build:
context: .
dockerfile: ./compose/local/redis/Dockerfile
container_name: printnanny_webapp_redis
ports:
- "6379:6379"
prometheus:
container_name: printnanny_webapp_prometheus
hostname: prometheus
image: prom/prometheus
ports:
- 9000:9090
volumes:
- ./prometheus:/etc/prometheus
- local_prometheus_data:/prometheus
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
cloud-nats:
hostname: nats
image: nats:2.8-alpine
container_name: printnanny_webapp_nats
volumes:
- .nats/:/etc/nats
- local_jetstream_data:/data/jetstream:z
command:
- -c
- /etc/nats/nats-server.conf
- --name
- localnats
ports:
- "4222:4222"
- "8443:8443"
- "1883:1883"
# windmill_server:
# image: ghcr.io/windmill-labs/windmill:main
# deploy:
# replicas: 1
# restart: unless-stopped
# ports:
# - 8000:8000
# env_file:
# - ./.envs/.local/.windmill
# environment:
# - RUST_LOG=debug
# ## You can set the number of workers to > 0 and not need any separate worker service
# - NUM_WORKERS=1
# - DISABLE_SERVER=false
# - METRICS_ADDR=false
# depends_on:
# - postgres14
# - django
# volumes:
# - ./compose/local/windmill/oauth.json/:/usr/src/app/oauth.json
# windmill_worker:
# image: ghcr.io/windmill-labs/windmill:main
# deploy:
# replicas: 1
# restart: unless-stopped
# env_file:
# - ./.envs/.local/.windmill
# environment:
# - RUST_LOG=debug
# - NUM_WORKERS=1
# - DISABLE_SERVER=true
# - KEEP_JOB_DIR=true
# - DENO_PATH=/usr/bin/deno
# - PYTHON_PATH=/usr/local/bin/python3
# - METRICS_ADDR=false
# depends_on:
# - postgres14
# - django
# volumes:
# - local_windmill_worker_dependency_cache:/tmp/windmill/cache
# - ./compose/local/windmill/oauth.json/:/usr/src/app/oauth.json