-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (89 loc) · 2.47 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
version: '3.9'
services:
# PostgreSQL database supporting the django web application
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
# Demo django web application
web:
build: ./webapp
# context: ./webapp
# dockerfile: Dockerfile-django
image: local/django-example:latest
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./webapp/:/code
ports:
- "8001:8000"
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
depends_on:
- db
# PostgreSQL database supporting keycloak
keycloak-postgresql:
image: docker.io/bitnami/postgresql:11
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
# - ALLOW_EMPTY_PASSWORD=yes
- POSTGRESQL_PASSWORD=keycloak
- POSTGRESQL_USERNAME=keycloak
- POSTGRESQL_DATABASE=keycloak
volumes:
- 'keycloak_pg_data:/bitnami/postgresql'
ports:
- "5432:5432"
# Demo keycloak
keycloak:
build: ./keycloak
image: local/keycloak:18.0.0
environment:
- KC_DB_URL_HOST=keycloak-postgresql
- KC_DB_URL_PORT=5432
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=keycloak
- KC_DB_URL_DATABASE=keycloak
# - KC_HOSTNAME=keycloak
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- PROXY_ADDRESS_FORWARDING=true
command: ["--https-certificate-file=/opt/tls/server.pem", "--https-certificate-key-file=/opt/tls/server.key", "--hostname=keycloak.example.com", "--log-level", "debug"]
volumes:
- ./keycloak/keycloak-server-key.pem:/opt/tls/server.key:ro
- ./keycloak/keycloak-server.pem:/opt/tls/server.pem:ro
depends_on:
- keycloak-postgresql
ports:
- "8443:8443"
# Demo OpenLDAP server
ldap:
build: ./ldap
image: local/openldap:latest
# Demo LDAP admin portal
phpldapadmin:
image: osixia/phpldapadmin:latest
container_name: phpldapadmin
environment:
PHPLDAPADMIN_LDAP_HOSTS: "ldap"
PHPLDAPADMIN_HTTPS: "false"
ports:
- "8080:80"
depends_on:
- ldap
# Demo javascript application
js-console:
build: ./js-console
image: local/js-console:latest
volumes:
- ./js-console/src/:/usr/local/apache2/htdocs/
ports:
- "8000:80"
volumes:
keycloak_pg_data:
external: true