forked from firmanJS/sso-keycloak-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·60 lines (55 loc) · 1.66 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
version: '3'
services:
keycloak_db_sso:
image: postgres:11.2-alpine
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_ROOT_PASSWORD=${POSTGRES_ROOT_PASSWORD}
networks:
service_sso_net:
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- keycloak_sso_vol:/var/lib/postgresql/data
keycloak:
image: 'quay.io/keycloak/keycloak:${KC_VERSION}'
hostname: keycloak
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://keycloak_db_sso:5432/${POSTGRES_DB}
KC_DB_USERNAME: ${POSTGRES_USER}
KC_DB_PASSWORD: ${POSTGRES_PASSWORD}
KC_HOSTNAME_STRICT: 'false'
KC_HOSTNAME_STRICT_HTTPS: 'false'
# DB_SCHEMA: public
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
# 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"
command: start-dev
networks:
service_sso_net:
ports:
- "${KEYCLOAK_PORT}:8080"
depends_on:
- keycloak_db_sso
# for PHP example uncomment this service if using PHP
service_app:
build:
context: ./service/php
dockerfile: Dockerfile
restart: always
networks:
service_sso_net:
env_file:
- .env
ports:
- ${SERVICE_PORT}:80
volumes:
- ./service/php:/var/www/html/
networks:
service_sso_net:
volumes:
keycloak_sso_vol: