forked from keycloak/keycloak-nodejs-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (83 loc) · 3.24 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
version: "3.7"
x-logging:
&default-logging
driver: "json-file"
options:
max-size: "2m"
max-file: "2"
services:
portainer:
image: portainer/portainer-ce:2.5.0-alpine
hostname: portainer
container_name: portainer
restart: unless-stopped
# Admin User password: Password01
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./DockerVolumes/portainer_data:/data
ports:
- 8000:8000
- 9000:9000
networks:
- keycloak-nodejs-connect-testing
logging: *default-logging
keycloak:
image: quay.io/keycloak/keycloak:12.0.4
hostname: keycloak
container_name: keycloak
restart: unless-stopped
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_HTTPS_PORT: 8443
JAVA_OPTS: "-Djboss.as.management.blocking.timeout=3600"
#------------------------------------------------------------------------------------------------------------
# Export Realm, see https://hub.docker.com/r/jboss/keycloak/
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Import Realm, see https://hub.docker.com/r/jboss/keycloak/
# KEYCLOAK_IMPORT: /config/nodejs-test-realm.json
#------------------------------------------------------------------------------------------------------------
command:
# see https://stackoverflow.com/questions/61184888/how-to-import-multiple-realm-in-keycloak
- "-b 0.0.0.0"
- "-Dkeycloak.migration.action=import"
- "-Dkeycloak.migration.provider=singleFile"
- "-Dkeycloak.migration.file=/config/nodejs-test-realm.json"
- "-Dkeycloak.migration.strategy=IGNORE_EXISTING"
volumes:
- ./test/fixtures/auth-utils/nodejs-test-realm.json:/config/nodejs-test-realm.json
ports:
- 8080:8080
- 8443:8443
- 9990:9990
healthcheck:
test: "curl -f http://localhost:8080/auth || exit 1"
start_period: 10s
networks:
- keycloak-nodejs-connect-testing
logging: *default-logging
networks:
keycloak-nodejs-connect-testing:
name: keycloak-nodejs-connect-testing
# ------------------------------------------------------------------------------------------------------------------------------------
# http://localhost:8080/auth/admin/master/console
# ------------------------------------------------------------------------------------------------------------------------------------
# DOCKER WINDOWS PORT BINDING ERROR
# =====================================
# ERROR:
# ------
# Ports are not available: listen tcp 0.0.0.0:8022:
# bind: An attempt was made to access a socket in a way forbidden by its access permissions
#
# SOLUTION:
# ---------
# from admin command prompt run the following two commands:
# sc stop winnat
#
# Notes:
# sc qc winnat
# sc query winnat
# "C:\Program Files\Docker\Docker\Docker Desktop.exe"
# DO NOT "sc config WinNat start=demand" as docker will crash on startup!!!
# ------------------------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------------------------------------------