-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdocker-compose-self-ssl.yml
58 lines (55 loc) · 1.35 KB
/
docker-compose-self-ssl.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
version: '2.1'
networks:
keycloak-network:
volumes:
keycloak-postgres-data:
keycloak-nginx-ssl:
services:
postgres:
image: postgres:9.6-alpine
container_name: postgres
networks:
- keycloak-network
volumes:
- keycloak-postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=keycloak
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=password
restart: unless-stopped
keycloak:
image: jboss/keycloak-postgres
container_name: keycloak
links:
- postgres
networks:
- keycloak-network
depends_on:
- postgres
environment:
- POSTGRES_DATABASE=keycloak
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=password
- PROXY_ADDRESS_FORWARDING=true
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
# JBoss is using legacy linking environment variables
- POSTGRES_PORT_5432_TCP_ADDR=postgres
- POSTGRES_PORT_5432_TCP_PORT=5432
restart: unless-stopped
nginx:
image: ernsheong/keycloak-nginx-self-ssl
container_name: nginx
networks:
- keycloak-network
depends_on:
- keycloak
volumes:
- keycloak-nginx-ssl:/etc/nginx/ssl
environment:
- KEYCLOAK_HOST=keycloak
- KEYCLOAK_PORT=8080
- KEYCLOAK_DOMAIN=www.example.com
ports:
- "443:443"
restart: unless-stopped