-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.devauth.yaml
99 lines (95 loc) · 2.9 KB
/
docker-compose.devauth.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
92
93
94
95
96
97
98
99
version: "3"
services:
api:
image: node:16
working_dir: /usr/src/app/
environment:
- REDIS_HOST=redis_cache
- REDIS_PORT=6379
- REDIS_PASSWORD=r3d1sc4ch3
volumes:
- ./packages/server:/usr/src/app/
- ./config:/usr/config
- ./deployment/wait-for-it.sh:/wait-for-it.sh
- ./data/logs/api/:/usr/src/app/logs/
command: /bin/sh -c 'chmod +x dev-start.sh /wait-for-it.sh && /wait-for-it.sh -t 0 keycloak:8080 -- /usr/src/app/dev-start.sh'
ports:
- '3001:3001'
depends_on:
- keycloak
- redis_cache
labels:
- traefik.http.routers.api.rule=Host(`localhost`) && PathPrefix(`/api`)
- traefik.http.routers.api.entrypoints=web
frontend:
image: node:16
working_dir: /usr/src/app/
volumes:
- ./packages/client:/usr/src/app/
- ./config/ui-config.json:/usr/src/app/public/ui-config.json
command: /bin/sh -c 'chmod +x /usr/src/app/dev-start.sh && /usr/src/app/dev-start.sh'
ports:
- '8080:8080'
labels:
- traefik.http.routers.frontend.rule=Host(`localhost`) && PathPrefix(`/`)
- traefik.http.routers.frontend.entrypoints=web
traefik:
image: traefik:v2.9
command:
- --entrypoints.web.address=:80
- --providers.docker=true
- --log.level=DEBUG
- --log.filePath=/logs/traefik.log
ports:
- "80:80"
depends_on:
- keycloak
- api
- frontend
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/logs/traefik/:/logs/
keycloak-db:
image: postgres:12.2-alpine
environment:
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=k3ycl04kUser
- POSTGRES_DB=keycloak
volumes:
- ./data/keycloak-postgres:/var/lib/postgresql/data
keycloak:
image: quay.io/keycloak/keycloak:18.0.0
expose:
- 8080
depends_on:
- keycloak-db
links:
- keycloak-db:keycloak-db
entrypoint: /bin/sh -c 'chmod +x /wait-for-it.sh && /wait-for-it.sh -t 0 keycloak-db:5432 -- /opt/keycloak/bin/kc.sh start-dev --log=file,console'
environment:
- KC_HOSTNAME_STRICT_HTTPS=false
- KC_HOSTNAME_STRICT=false
- KC_HTTP_ENABLED=true
- KC_DB=postgres
- KC_DB_URL_HOST=keycloak-db
- KC_DB_URL_DATABASE=keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=k3ycl04kUser
- KC_PROXY=passthrough
- KC_HOSTNAME_PATH=/auth
- KC_HTTP_RELATIVE_PATH=/auth
volumes:
- ./deployment/wait-for-it.sh:/wait-for-it.sh
- ./data/logs/keycloak/:/opt/keycloak/data/log/
labels:
- traefik.http.routers.keycloak.rule=Host(`localhost`) && PathPrefix(`/auth`)
- traefik.http.routers.keycloak.entrypoints=web
redis_cache:
image: redis:alpine3.15
command: redis-server --requirepass r3d1sc4ch3
environment:
- REDIS_REPLICATION_MODE=master
volumes:
- ./data/redis:/var/lib/redis
ports:
- '6379:6379'