-
Notifications
You must be signed in to change notification settings - Fork 6
/
compose.yaml
91 lines (85 loc) · 2.34 KB
/
compose.yaml
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
---
services:
backend:
user: "${UID:?Set UID env variable to your user id}"
build:
context: ./backend
target: dev
depends_on:
- mailpit
- db
environment:
- ENV=dev
- EMAIL_URL=smtp://mailpit:1025
- DJANGO_OIDC_USERNAME_CLAIM=preferred_username
- STATIC_ROOT=/var/www/static
- DJANGO_EMAIL_USE_TLS=False
volumes:
- ./backend:/app
ports:
- 8000:8080
- 8081:8081
frontend:
build:
context: ./frontend
environment:
- TIMED_SSO_CLIENT_HOST=https://timed.localhost/auth/realms/timed/protocol/openid-connect
- TIMED_SSO_CLIENT_ID=timed-public
keycloak:
image: keycloak/keycloak:26.0.6
depends_on:
- db
volumes:
- ./keycloak/config.json:/opt/keycloak/data/import/config.json
environment:
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://db/keycloak
- KC_DB_USERNAME=keycloak
- KEYCLOAK_ADMIN=admin
- KC_HOSTNAME_STRICT=false
- KC_HOSTNAME_STRICT_HTTPS=false
- KC_HTTP_RELATIVE_PATH=/auth
- KC_HTTP_ENABLED=true
- KC_PROXY=edge
- KC_DB_PASSWORD=keycloak
- KEYCLOAK_ADMIN_PASSWORD=admin
# import: docker compose exec keycloak /opt/keycloak/bin/kc.sh import --override true --file /opt/keycloak/data/import/config.json
# export: docker compose exec keycloak /opt/keycloak/bin/kc.sh export --file /opt/keycloak/data/import/config.json
command: "start --hostname timed.localhost --proxy-headers xforwarded"
caddy:
image: caddy:2.6-alpine
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
environment:
- DOMAIN_NAME=timed.localhost
networks:
default:
aliases:
- timed.localhost
mailpit:
image: axllent/mailpit
environment:
MP_WEBROOT: mailpit
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
db:
image: postgres:14.4
ports:
- 5432:5432
volumes:
- dbdata:/var/lib/postgresql/data
- ./postgres/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
environment:
- POSTGRES_USER=timed
- POSTGRES_PASSWORD=timed
- POSTGRES_DB=timed
- KEYCLOAK_DB_PASSWORD=keycloak
volumes:
caddy_data:
caddy_config:
dbdata: