-
Notifications
You must be signed in to change notification settings - Fork 17
/
eclipse-pass.local.yml
121 lines (112 loc) · 3.57 KB
/
eclipse-pass.local.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Env customizations for a local development instance
services:
pass-core:
depends_on:
postgres:
condition: service_started
localstack:
condition: service_healthy
idp:
condition: service_healthy
env_file:
- .env
- .eclipse-pass.local_env
healthcheck:
test: 'curl -u "$$PASS_CORE_USER:$$PASS_CORE_PASSWORD" -f http://pass-core:8080/data/user || exit 1'
start_period: 60s
interval: 5s
ports:
- 8080:8080
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./pass-core/saml2/:/saml2/
pass-ui:
env_file:
- .env
- .eclipse-pass.local_env
postgres:
image: postgres:15-alpine
restart: always
env_file:
- .env
- .eclipse-pass.local_env
networks:
- back
volumes:
- db:/var/lib/postgresql/data
- ./postgres/demo/init_postgres.sh:/docker-entrypoint-initdb.d/init_postgres.sh
idp:
image: "tier/shib-idp:4.3.3_20240415"
container_name: idp
depends_on:
ldap:
condition: service_healthy
env_file:
- .env
- .eclipse-pass.local_env
ports:
- 9080:${IDP_INTERNAL_PORT-8080}
command:
- /bin/bash
- -c
- |
cp /idp-config/config/tomcat/* /usr/local/tomcat/conf
cp /idp-config/credentials/tomcat/* /opt/certs
cp /idp-config/config/shib-idp/conf/* /opt/shibboleth-idp/conf
cp /idp-config/credentials/shib-idp/* /opt/shibboleth-idp/credentials
cp /idp-config/config/shib-idp/metadata/* /opt/shibboleth-idp/metadata
cp /idp-config/dummylogo.png /opt/shibboleth-idp/edit-webapp/images/placeholder-logo.png
sed -i "s#IDP_HOST#$$IDP_HOST#g" /opt/shibboleth-idp/metadata/idp-metadata.xml
sed -i "s#IDP_HOST#$$IDP_HOST#g" /opt/shibboleth-idp/conf/idp.properties
sed -i "s#SP_LOGIN#$$SP_LOGIN#g" /opt/shibboleth-idp/metadata/sp-metadata.xml
/usr/bin/startup.sh
healthcheck:
start_period: 60s
interval: 5s
volumes:
- ./idp:/idp-config
networks:
- back
ldap:
image: "389ds/dirsrv:3.1"
container_name: ldap
env_file:
- .env
- .eclipse-pass.local_env
# Healthy when manage to create the suffix and load users
healthcheck:
test: '(dsconf -D "cn=Directory Manager" localhost backend create --suffix="$$DS_SUFFIX_NAME" --be-name="pass"; ldapadd -f /pass.ldif -H ldap://localhost:3389 -w "$$DS_DM_PASSWORD" -D "cn=Directory Manager") || exit 1'
start_period: 60s
interval: 5s
volumes:
- ./ldap/pass.ldif:/pass.ldif
networks:
- back
loader:
image: curlimages/curl:8.11.0
container_name: loader
env_file:
- .env
- .eclipse-pass.local_env
entrypoint: /bin/sh -c
command: [ 'curl http://pass-core:8080/data/ -u "$$PASS_CORE_USER:$$PASS_CORE_PASSWORD" -X PATCH -H "content-type: application/vnd.api+json;ext=jsonpatch" -H "accept:application/vnd.api+json; ext=jsonpatch" -H "X-XSRF-TOKEN:moo" -H "Cookie:XSRF-TOKEN=moo" -d "@/data.json"' ]
networks:
- back
depends_on:
pass-core:
condition: service_healthy
volumes:
- ./demo_data.json:/data.json
localstack:
container_name: "localstack"
image: localstack/localstack:3.8.1
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "./localstack/aws_bootstrap.sh:/etc/localstack/init/ready.d/init-aws.sh"
networks:
- back