-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
84 lines (84 loc) · 2.46 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
version: '2'
services:
postgres:
image: postgres:9.6
expose:
- "5432"
environment:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
keycloak:
image: jboss/keycloak:4.1.0.Final@sha256:14de3b512d227732270b3e6f4fa626a096542a2e8c4ec32480de6a3ca64c25c2
links:
- postgres
environment:
PROXY_ADDRESS_FORWARDING: "true"
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: openidctest
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
# Workaround for container using legacy Docker links, resulting in
# "WFLYCTL0211: Cannot resolve expression 'jdbc:postgresql://${env.POSTGRES_PORT_5432_TCP_ADDR}...")n
POSTGRES_PORT_5432_TCP_ADDR: postgres
expose:
- "8080"
- "9990"
ports:
- "8080:8080"
httpd-openidc:
build: ../httpd-openidc
image: localhost:5000/reposoft/httpd-openidc
entrypoint:
- echo
- "This was just a build job. Exiting."
redis:
image: redis:4.0.2@sha256:cd277716dbff2c0211c8366687d275d2b53112fecbf9d6c86e9853edb0900956
expose:
- "6379"
openidc:
build: ./openidc
depends_on:
- httpd-openidc
links:
# Commented out to disallow direct communication with keycloak; depends on hosting scenario
# - keycloak
- redis
expose:
- "80"
ports:
- "80:80"
command:
- -DLOGLEVEL=info
volumes:
- ./html-ajax:/usr/local/apache2/htdocs
openidc2:
build: ./openidc
depends_on:
- httpd-openidc
links:
- redis
ports:
- "2080:80"
volumes:
- ./html-ajax:/usr/local/apache2/htdocs
entrypoint:
- /bin/bash
- -ce
- >
sed -i 's|http://openidc/|http://openidc:2080/|' conf/000-default.conf;
echo "This instance will test cache sharing when auth happened at the first instance and this one can't reach keycloak";
sed -i 's|http://keycloak:8080/|http://keycloak-access-not-allowed-from-instance-2:8080/|' conf/000-default.conf;
sed -i "s|ServerName openidc|ServerName openidc\n ErrorDocument 500 '500: expected if instance 2 sees no session cache, or tries to revalidate'|" conf/000-default.conf;
cat conf/000-default.conf | grep 'http://';
httpd -DFOREGROUND -DLOGLEVEL=debug
keycloak-setup:
build: ./keycloak-setup
links:
- keycloak
volumes:
- ./keycloak-setup/export:/export
testclient:
build: ./client-node-request
links:
- openidc
- keycloak