-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.dev.yml
149 lines (147 loc) · 3.13 KB
/
docker-compose.dev.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
---
services:
base:
extends:
file: docker-compose.base.yml
service: base
dev-app:
extends:
file: docker-compose.base.yml
service: dev
security_opt:
- "seccomp:unconfined"
depends_on:
dev-db:
condition: service_healthy
dev-migrate:
condition: service_completed_successfully
dev-ldap:
condition: service_healthy
dev-mq:
condition: service_healthy
dev-bundler:
condition: service_started
networks:
dev:
aliases:
- app
ports:
- "5000:5000"
command: ["shell", "flask", "run", "--debug", "--host=0.0.0.0"]
healthcheck:
test: curl --fail http://localhost:5000
interval: 2s
start_period: 10s
dev-migrate:
extends:
file: docker-compose.base.yml
service: dev
networks:
dev:
command: ["shell", "flask", "alembic", "upgrade", "head"]
depends_on:
dev-db:
condition: service_healthy
dev-bundler:
extends:
file: docker-compose.base.yml
service: dev
command: ["bun", "run", "bundle", "--watch"]
dev-docs:
extends:
file: docker-compose.base.yml
service: dev
command: [
"serve-docs",
"--watch", "pycroft",
"--watch", "doc/_static",
"--watch", "ldap_sync",
"--watch", "web",
]
healthcheck:
test: curl --fail http://localhost:8000
ports:
- "5001:8000"
dev-db:
extends:
file: docker-compose.base.yml
service: db
networks:
dev:
aliases:
- db
volumes:
- "db:/var/lib/postgresql"
ports:
- "55432:5432"
dev-ldap:
extends:
file: docker-compose.base.yml
service: ldap
networks:
dev:
aliases:
- ldap
volumes:
- "ldap:/var/lib/ldap"
dev-mq:
extends:
file: docker-compose.base.yml
service: mq
networks:
dev:
aliases:
- mq
volumes:
- "mq:/var/lib/rabbitmq"
ports:
- "15672:15672"
dev-celery-worker:
extends:
file: docker-compose.base.yml
service: dev
depends_on:
dev-db:
condition: service_healthy
dev-mq:
condition: service_healthy
networks:
dev:
aliases:
- celery-worker
command: "worker"
healthcheck:
test: "/opt/pycroft/venv/bin/celery -A pycroft.task inspect ping"
dev-dummy-worker:
extends:
file: docker-compose.base.yml
service: dev
command: "dummy-worker worker --loglevel=debug"
healthcheck:
test: "PYTHONPATH=/opt/pycroft/app /opt/pycroft/venv/bin/celery -A helpers.dummy_celery_worker inspect ping"
environment:
- TEST_HADES_BROKER_URI=amqp://celery:celery@mq:5672/
- TEST_HADES_RESULT_BACKEND_URI=rpc://celery:celery@mq:5672/
depends_on:
dev-mq:
condition:
service_healthy
networks:
dev:
aliases:
- dummy-worker
dev-mail:
extends:
file: docker-compose.base.yml
service: mail
networks:
dev:
aliases:
- mail
volumes:
home:
db:
ldap:
mq:
networks:
dev: