-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (113 loc) · 2.91 KB
/
docker-compose.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.8'
services:
config-server:
build: ./config-server
ports:
- "8071"
networks:
backend:
aliases:
- "config-server"
discovery-service:
build: ./discovery-service
ports:
- "8070"
networks:
backend:
aliases:
- "discovery-service"
gateway:
build: ./gateway
ports:
- "8072:8072"
networks:
backend:
aliases:
- "gateway"
depends_on:
keycloak:
condition: service_healthy
ui:
build: ./ui
ports:
- "8080"
networks:
backend:
aliases:
- "ui"
postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
networks:
backend:
aliases:
- "postgres"
keycloak:
#image: quay.io/keycloak/keycloak:19.0.3
#command: ["start-dev", "--log-level=debug"]
build: ./keycloak
#command: ["start-dev", "--auto-build"]
environment:
#KEYCLOAK_FRONTEND_URL: http://localhost:8079
# WORKS # KEYCLOAK_FRONTEND_URL: http://keycloak:8080/auth
# KEYCLOAK_HOSTNAME: keycloak
#PROXY_ADDRESS_FORWARDING: true
#KC_HOSTNAME_STRICT_BACKCHANNEL: "true"
#KEYCLOAK_AUTH_URL: http://keycloak:8080/auth
#KEYCLOAK_AUTH_URL: http://localhost:8079/auth
#DB_VENDOR: POSTGRES
#DB_ADDR: postgres
#DB_DATABASE: keycloak
#DB_USER: keycloak
#DB_SCHEMA: public
#DB_PASSWORD: password
KC_DB: postgres
KC_DB_URL: postgres
KC_DB_URL_HOST: postgres
KC_DB_URL_DATABASE: keycloak
KC_DB_USERNAME: keycloak
KC_DB_SCHEMA: public
KC_DB_PASSWORD: password
#KC_HOSTNAME: localhost
#KC_HOSTNAME_PORT: 8080
KC_HTTP_PORT: 8079
#KEYCLOAK_USER: admin
#KEYCLOAK_PASSWORD: Pa55w0rd
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: Pa55w0rd
# Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.
#JDBC_PARAMS: "ssl=true"
ports:
- "8079:8079"
depends_on:
- postgres
networks:
backend:
aliases:
- "keycloak"
healthcheck:
test: "/bin/sh -c 'curl -f http://localhost:8079/realms/Test_realm || exit 1'"
interval: 7s
timeout: 5s
retries: 15
start_period: 80s
networks:
backend:
name: custom_backend
driver: bridge
volumes:
postgres_data:
driver: local
#######################
### USEFUL COMMANDS ###
#######################
# docker-compose up -d --build
# docker-compose start
# docker-compose down --remove-orphans
# connect to all logs
# docker-compose logs -f -t