-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.aboutbits.yml
105 lines (99 loc) · 2.69 KB
/
docker-compose.aboutbits.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
# SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it>
#
# SPDX-License-Identifier: CC0-1.0
version: "3.4"
services:
keycloak01:
image: authentication-server-keycloak
build:
context: ./
dockerfile: infrastructure/docker/keycloak/Dockerfile
target: prod
environment:
KC_LOG_LEVEL: info
KC_CACHE_STACK: udp
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KC_HOSTNAME_STRICT: 'false'
KC_HTTP_ENABLED: 'true'
KC_PROXY: 'passthrough'
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/health"]
interval: 20s
timeout: 10s
retries: 5
start_period: 30s
depends_on:
- postgres
networks:
- internal
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.auth1.entrypoints=http,https
- traefik.http.routers.auth1.rule=Host(`auth.proxy.test`)
- traefik.http.routers.auth1.tls=true
- traefik.http.routers.auth1.service=auth
- traefik.http.services.auth.loadbalancer.server.port=8080
# - traefik.http.services.auth.loadbalancer.sticky.cookie=true
keycloak02:
image: authentication-server-keycloak
environment:
KC_LOG_LEVEL: info
KC_CACHE_STACK: udp
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KC_HOSTNAME_STRICT: 'false'
KC_HTTP_ENABLED: 'true'
KC_PROXY: 'passthrough'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/health"]
interval: 20s
timeout: 10s
retries: 5
start_period: 30s
depends_on:
- postgres
- keycloak01
networks:
- internal
- proxy
labels:
- traefik.enable=true
- traefik.http.routers.auth2.entrypoints=http,https
- traefik.http.routers.auth2.rule=Host(`auth.proxy.test`)
- traefik.http.routers.auth2.tls=true
- traefik.http.routers.auth2.service=auth
- traefik.http.services.auth.loadbalancer.server.port=8080
# - traefik.http.services.auth.loadbalancer.sticky.cookie=true
postgres:
image: postgres:12
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
ports:
- 5432:5432
networks:
- internal
labels:
- traefik.enable=false
mailhog:
image: mailhog/mailhog
ports:
- 8025:8025
networks:
- internal
labels:
- traefik.enable=false
networks:
proxy:
external: true
internal:
external: false