-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (63 loc) · 1.75 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
version: "3.4"
x-default-deploy:
&default-deploy
restart_policy:
condition: on-failure
max_attempts: 3
x-default-logging:
&default-logging
driver: json-file
options:
max-size: "1m"
max-file: "1"
# TODO: Add gliderlabs/logspout as a global service in a separate stack so we can pipe logs to an external service (eg: papertrail)
services:
# Keycloak (authentication) setup (should maybe go into an external deployment)
# TODO: move secrets into docker secrets
keycloak:
image: jboss/keycloak:4.5.0.Final
ports:
- 8080:8080
environment:
KEYCLOAK_USER: keycloak
KEYCLOAK_PASSWORD: $KEYCLOAK_PASSWORD
DB_VENDOR: POSTGRES
DB_PASSWORD: $KEYCLOAK_PASSWORD
PROXY_ADDRESS_FORWARDING: "true"
logging: *default-logging
deploy: *default-deploy
postgres:
image: postgres:9-alpine
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: $KEYCLOAK_PASSWORD
volumes:
- keycloakdb:/var/lib/postgresql/data
logging: *default-logging
deploy:
placement:
constraints:
- node.labels.type == master-1
restart_policy:
condition: on-failure
max_attempts: 3
keycloak-init:
image: registry-special.tenforce.com/special/keycloak-initializer:all-redirect-uris-allowed
environment:
KEYCLOAK_ENDPOINT: http://keycloak:8080/auth
KEYCLOAK_CLIENT_SECRET: $KEYCLOAK_CLIENT_SECRET
KEYCLOAK_PASSWORD: $KEYCLOAK_PASSWORD
KEYCLOAK_GENERATOR_PASSWORD: $KEYCLOAK_GENERATOR_PASSWORD
logging: *default-logging
deploy:
restart_policy:
condition: none
volumes:
caddycert: {}
keycloakdb:
driver: local
networks:
default:
external:
name: special-demonstrator