-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.base.yml
93 lines (93 loc) · 2.88 KB
/
docker-compose.base.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
---
services:
base:
build:
context: docker/base
dockerfile: ../base.Dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
image: agdsn/pycroft-base:${TAG:-latest}
entrypoint: ["/bin/true"]
command: []
dev-base:
build:
context: docker/dev
dockerfile: ../dev.Dockerfile
x-bake:
contexts:
pycroft-base: target:base
image: agdsn/pycroft-dev:${TAG:-latest}
environment:
PATH: /opt/pycroft/venv/bin:/opt/pycroft/venv/bin:/opt/venv/bin:/usr/local/bin:/usr/bin:/bin
PYTHONDEVMODE: 1
PYCROFT_DB_URI: postgresql://postgres:password@db:5432/pycroft?options=-csearch_path%3Dpycroft,public
PYCROFT_API_KEY: secret
PYCROFT_LDAP_HOST: ldap
PYCROFT_LDAP_PORT: 389
PYCROFT_LDAP_BIND_DN: cn=admin,dc=agdsn,dc=de
PYCROFT_LDAP_BIND_PW: password
PYCROFT_LDAP_BASE_DN: ou=pycroft,dc=agdsn,dc=de
PYCROFT_CELERY_BROKER_URI: amqp://celery:celery@mq:5672/
PYCROFT_CELERY_RESULT_BACKEND_URI: rpc://celery:celery@mq:5672/
PYCROFT_MAIL_ENVELOPE_FROM: [email protected]
PYCROFT_MAIL_FROM: AG DSN <[email protected]>
PYCROFT_SMTP_HOST: mail
PYCROFT_SMTP_PORT: 2500
PYCROFT_SMTP_USER: ''
PYCROFT_SMTP_SSL: ''
PYCROFT_SMTP_PASSWORD: ''
# PYCROFT_TEMPLATE_PATH: 'pycroft/templates'
HADES_CELERY_APP_NAME: dummy_tasks
HADES_BROKER_URI: amqp://celery:celery@mq:5672/
HADES_RESULT_BACKEND_URI: rpc://celery:celery@mq:5672/
SWDD_HASH_KEY: key
MAIL_CONFIRM_URL: "http://localhost/sipa/register/confirm/{}"
PASSWORD_RESET_URL: "http://localhost/sipa/reset-password/{}"
# alternative: `scripts.server_run:prepare_server(echo=True)`
FLASK_APP: scripts.server_run:prepare_server
FLASK_ENV: development
dev:
extends: dev-base
volumes:
- "home:/opt/pycroft"
- ".:/opt/pycroft/app"
db:
build:
context: ./docker/db
dockerfile: ../db.Dockerfile
environment:
- TZ=Etc/UTC
- POSTGRES_DB=pycroft
- POSTGRES_PASSWORD=password
- POSTGRES_INITDB_ARGS=--locale=C --encoding=UTF-8
healthcheck:
test: pg_isready -U postgres
interval: 2s
timeout: 2m
ldap:
image: dinkel/openldap:2.4.44
environment:
- SLAPD_PASSWORD=password
- SLAPD_DOMAIN=agdsn.de
- SLAPD_ADDITIONAL_SCHEMAS=ppolicy,custom/group-of-members
- SLAPD_ADDITIONAL_MODULES=ppolicy
volumes:
- ./docker/ldap/schema:/etc/ldap/schema/custom
healthcheck:
test: "slapdn cn=config"
interval: 2s
mq:
image: rabbitmq:3.8-management
environment:
- RABBITMQ_DEFAULT_USER=celery
- RABBITMQ_DEFAULT_PASS=celery
healthcheck:
test: rabbitmq-diagnostics check_running
start_period: 30s
interval: 5s
timeout: 2m
mail:
build:
context: ./docker/
dockerfile: mail.Dockerfile