-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.test.yml
79 lines (77 loc) · 1.65 KB
/
docker-compose.test.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
---
services:
base:
extends:
file: docker-compose.base.yml
service: base
test-app:
extends:
file: docker-compose.base.yml
service: dev
command: ["/bin/sleep", "10"]
depends_on:
- test-db
- test-ldap
- test-mq
- test-dummy-worker
networks:
- test
test-db:
extends:
file: docker-compose.base.yml
service: db
# Make PostgreSQL fly
command:
- "-cshared_buffers=64MB"
- "-cwork_mem=128MB"
- "-cfsync=off"
- "-cfull_page_writes=off"
- "-cwal_level=minimal"
- "-cmax_wal_senders=0"
networks:
test:
aliases:
- db
tmpfs:
- /var/lib/postgresql/data
test-ldap:
extends:
file: docker-compose.base.yml
service: ldap
environment:
- SLAPD_FORCE_RECONFIGURE=true
networks:
test:
aliases:
- ldap
tmpfs:
- /var/lib/ldap
test-mq:
extends:
file: docker-compose.base.yml
service: mq
networks:
test:
aliases:
- mq
tmpfs:
- /var/lib/rabbitmq
# a dummy worker mocking hades for testing the client
test-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:
- test-mq
networks:
- test
networks:
test:
volumes:
home: