-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
70 lines (66 loc) · 1.65 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
version: "3.9"
services:
postgres:
container_name: db
image: "postgres:14.4"
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
volumes:
- postgres_data:/var/lib/postgresql/data
#- ./sql:/docker-entrypoint-initdb.d/:ro # turn it on, if you need run init DB
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: keycloak
POSTGRES_HOST: postgres
networks:
- local
ports:
- "5432:5432"
pgadmin:
container_name: pgadmin
image: "dpage/pgadmin4:5.1"
environment:
PGADMIN_DEFAULT_EMAIL: postgres@domain.local
PGADMIN_DEFAULT_PASSWORD: postgres
ports:
- "5050:80"
networks:
- local
keycloak:
container_name: keycloak
build:
context: .
args:
KEYCLOAK_VERSION: 22.0.0
command: ['start', '--optimized']
depends_on:
- "postgres"
environment:
JAVA_OPTS_APPEND: -Dkeycloak.profile.feature.upload_scripts=enabled
KC_DB_PASSWORD: postgres
KC_DB_URL: jdbc:postgresql://postgres/keycloak
KC_DB_USERNAME: postgres
KC_HEALTH_ENABLED: 'true'
KC_HTTP_ENABLED: 'true'
KC_METRICS_ENABLED: 'true'
# KC_HOSTNAME: keycloak.com.au
# KC_HOSTNAME_PORT: 8180
KC_HOSTNAME_URL: http://keycloak.com.au:8180
KC_PROXY: reencrypt
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
ports:
- "8180:8080"
- "8787:8787" # debug port
networks:
- local
networks:
local:
name: local
driver: bridge
volumes:
postgres_data: