-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yml
182 lines (172 loc) · 6.68 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
services:
satosa-mongo:
profiles:
- demo
- mongo
- mongoexpress
image: mongo
container_name: satosa-mongo
environment:
MONGO_INITDB_DATABASE: oidcop
MONGO_INITDB_ROOT_USERNAME: "${MONGO_DBUSER:-satosa}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_DBPASSWORD:-thatpassword}"
TZ: "${TZ:-Europe/Rome}"
volumes:
- ./mongo/db:/data/db
- ./mongo/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh
# - mongodata:/data/db # to be used for external volumes
ports:
- '27017-27019:27017-27019'
networks:
- satosa-saml2spid
satosa-mongo-express:
profiles:
- demo
- mongoexpress
image: mongo-express
container_name: satosa-mongo-express
ports:
- 8082:8081
depends_on:
- satosa-mongo
environment:
ME_CONFIG_BASICAUTH_USERNAME: "${EXPRESS_USER:-satosauser}"
ME_CONFIG_BASICAUTH_PASSWORD: "${EXPRESS_PASSWORD:-satosapw}"
ME_CONFIG_MONGODB_ADMINUSERNAME: "${MONGO_DBUSER:-satosa}"
ME_CONFIG_MONGODB_ADMINPASSWORD: "${MONGO_DBPASSWORD:-thatpassword}"
ME_CONFIG_MONGODB_URL: mongodb://${MONGO_DBUSER:-satosa}:${MONGO_DBPASSWORD:-thatpassword}@satosa-mongo:27017/
TZ: "${TZ:-Europe/Rome}"
networks:
- satosa-saml2spid
django_sp:
profiles:
- demo
- dev
build:
context: ../
args:
- NODE_ENV=local
dockerfile: example_sp/django.Dockerfile
container_name: django_sp
working_dir: /django_sp
entrypoint: "sh ../entrypoint.sh"
volumes:
- ./djangosaml2_sp:/django_sp:rw
ports:
- "8000:8000"
networks:
- satosa-saml2spid
satosa-saml2spid:
image: ghcr.io/italia/satosa-saml2spid:latest
#image: satosa-saml2spid:latest
#build:
# context: ../
# args:
# - NODE_ENV=local
# dockerfile: Dockerfile
container_name: satosa-saml2spid
# depends_on:
# - satosa-mongo
stdin_open: ${SATOSA_DEBUG:-false} # enables PDB when attach to the compose
tty: ${SATOSA_DEBUG:-false} # enables PDB when attach to the compose
environment:
- TZ=${TZ:-Europe/Rome}
- SATOSA_BY_DOCKER=1
- GET_IDEM_MDQ_KEY=${GET_IDEM_MDQ_KEY:-true}
- BASE_DIR=/satosa_proxy
- SATOSA_PRIVATE_KEY=${SATOSA_KEYS_FOLDER:-./pki}/${SATOSA_PRIVATE_KEY_FILENAME:-privkey.pem}
- SATOSA_PUBLIC_KEY=${SATOSA_KEYS_FOLDER:-./pki}/${SATOSA_PUBLIC_KEY_FILENAME:-cert.pem}
- SATOSA_BASE=https://${SATOSA_HOSTNAME:-localhost}
- SATOSA_BASE_STATIC=${SATOSA_BASE}/static
- SATOSA_DISCO_SRV=${SATOSA_BASE_STATIC}/disco.html
- SATOSA_UNKNOW_ERROR_REDIRECT_PAGE=${SATOSA_BASE_STATIC}/error_page.html
- MONGODB_USERNAME=${MONGO_DBUSER:-satosa}
- MONGODB_PASSWORD=${MONGO_DBPASSWORD:-thatpassword}
- SATOSA_ENCRYPTION_KEY=${SATOSA_ENCRYPTION_KEY:-CHANGE_ME!}
- SATOSA_SALT=${SATOSA_SALT:-CHANGE_ME!}
- SATOSA_STATE_ENCRYPTION_KEY=${SATOSA_STATE_ENCRYPTION_KEY:-CHANGE_ME!}
- SATOSA_CONTACT_PERSON_EMAIL_ADDRESS=${SATOSA_CONTACT_PERSON_EMAIL_ADDRESS:-support.example@organization.org}
- SATOSA_CONTACT_PERSON_TELEPHONE_NUMBER=${SATOSA_CONTACT_PERSON_TELEPHONE_NUMBER:-+3906123456789}
- SATOSA_CONTACT_PERSON_FISCALCODE=${SATOSA_CONTACT_PERSON_FISCALCODE:-XXXXXX00X00X000Y}
- SATOSA_CONTACT_PERSON_GIVEN_NAME=${SATOSA_CONTACT_PERSON_GIVEN_NAME:-Contact Me}
- SATOSA_CONTACT_PERSON_IPA_CODE=${SATOSA_CONTACT_PERSON_IPA_CODE:-ipa00c}
- SATOSA_CONTACT_PERSON_MUNICIPALITY=${SATOSA_CONTACT_PERSON_MUNICIPALITY:-H501}
- SATOSA_ORGANIZATION_DISPLAY_NAME_EN=${SATOSA_ORGANIZATION_DISPLAY_NAME_EN:-Example Organization}
- SATOSA_ORGANIZATION_DISPLAY_NAME_IT=${SATOSA_ORGANIZATION_DISPLAY_NAME_IT:-Example Organization}
- SATOSA_ORGANIZATION_NAME_EN=${SATOSA_ORGANIZATION_NAME_EN:-example_organization}
- SATOSA_ORGANIZATION_NAME_IT=${SATOSA_ORGANIZATION_NAME_IT:-example_organization}
- SATOSA_ORGANIZATION_URL_EN=${SATOSA_ORGANIZATION_URL_EN:-https://example_organization.org}
- SATOSA_ORGANIZATION_URL_IT=${SATOSA_ORGANIZATION_URL_IT:-https://example_organization.org/it}
- SATOSA_UI_DESCRIPTION_EN=${SATOSA_UI_DESCRIPTION_EN:-Resource description}
- SATOSA_UI_DESCRIPTION_IT=${SATOSA_UI_DESCRIPTION_IT:-Resource description}
- SATOSA_UI_DISPLAY_NAME_EN=${SATOSA_UI_DISPLAY_NAME_EN:-Resource Display Name}
- SATOSA_UI_DISPLAY_NAME_IT=${SATOSA_UI_DISPLAY_NAME_IT:-Resource Display Name}
- SATOSA_UI_INFORMATION_URL_EN=${SATOSA_UI_INFORMATION_URL_EN:-https://example_organization.org/information_url}
- SATOSA_UI_INFORMATION_URL_IT=${SATOSA_UI_INFORMATION_URL_IT:-https://example_organization.org/it/information_url}
- SATOSA_UI_LOGO_HEIGHT=${SATOSA_UI_LOGO_HEIGHT:-60}
- SATOSA_UI_LOGO_WIDTH=${SATOSA_UI_LOGO_WIDTH:-80}
- SATOSA_UI_LOGO_URL=${SATOSA_UI_LOGO_URL:-https://example_organization.org/logo.png}
- SATOSA_UI_PRIVACY_URL_EN=${SATOSA_UI_PRIVACY_URL_EN:-https://example_organization.org/privacy}
- SATOSA_UI_PRIVACY_URL_IT=${SATOSA_UI_PRIVACY_URL_IT:-https://example_organization.org/it/privacy}
- SATOSA_USER_ID_HASH_SALT=${SATOSA_USER_ID_HASH_SALT:-CHANGE_ME!}
expose:
- 10000
ports:
- "10000:10000"
volumes:
- ./satosa-project:/satosa_proxy:rwx
# - satosadata:/satosa_proxy # to be used for external volumes
working_dir: /satosa_proxy
entrypoint: "sh entrypoint.sh"
networks:
- satosa-saml2spid
healthcheck:
test: wget -O - https://satosa-nginx/Saml2IDP/metadata --no-check-certificate || exit 1
interval: 30s
retries: 10
start_period: 30s
timeout: 30s
satosa-nginx:
image: nginx:alpine
container_name: satosa-nginx
depends_on:
- satosa-saml2spid
ports:
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/html:/usr/share/nginx/html:ro
- ./nginx/certs:/etc/nginx/certs:ro
# - static:/usr/share/nginx/html # to be used for external volumes
networks:
- satosa-saml2spid
environment:
- NGINX_HOST=${SATOSA_HOSTNAME:-localhost}
- TZ=${TZ:-Europe/Rome}
spid-samlcheck:
profiles:
- demo
- dev
image: italia/spid-saml-check
container_name: spid-samlcheck
ports:
- "8443:8443"
networks:
- satosa-saml2spid
networks:
satosa-saml2spid:
name: satosa-saml2spid
## External volumes
# volumes:
# mongodata:
# name: satosa-saml2spid_mongodata
# external: true
# nginx_certs:
# name: satosa-saml2spid_nginx_certs
# external: true
# satosadata:
# name: satosa-data
# external: true
# static:
# name: satosa-static
# external: true