This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree 3 files changed +31
-3
lines changed
3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ COPY ./contrib/nginx.conf /etc/nginx/conf.d/default.conf
15
15
16
16
WORKDIR /var/www/html
17
17
18
+ COPY ./docker-entrypoint.sh /
19
+ ENV TIMED_SSO_CLIENT_HOST https://sso.example.com/auth/realms/example/protocol/openid-connect
20
+ ENV TIMED_SSO_CLIENT_ID timed
21
+
18
22
EXPOSE 80
19
23
20
- ENTRYPOINT []
24
+ ENTRYPOINT ["/docker-entrypoint.sh" ]
21
25
CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ module.exports = function(environment) {
102
102
103
103
// eslint-disable-next-line no-empty
104
104
if ( environment === "production" ) {
105
- ENV [ "ember-simple-auth-oidc" ] . host =
106
- "https:// sso.adfinis-sygroup.ch/auth/realms/adsy/protocol/openid-connect ";
105
+ ENV [ "ember-simple-auth-oidc" ] . host = "sso-client-host" ;
106
+ ENV [ "ember-simple-auth-oidc" ] . clientId = " sso-client-id ";
107
107
}
108
108
109
109
return ENV ;
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ set -eu
4
+
5
+ urlencode () {
6
+ # urlencode <string>
7
+ # blatantly pinched from https://gist.github.com/cdown/1163649
8
+
9
+ local length=" ${# 1} "
10
+ for i in $( seq 0 $(( length- 1 )) ) ; do
11
+ local c=" ${1: i: 1} "
12
+ case $c in
13
+ [a-zA-Z0-9.~_-]) printf " $c " ;;
14
+ * ) printf ' %%%02X' " '$c " ;;
15
+ esac
16
+ done
17
+ }
18
+
19
+ sed -i \
20
+ -e " s/sso-client-id/$( urlencode ${TIMED_SSO_CLIENT_ID} ) /g" \
21
+ -e " s/sso-client-host/$( urlencode ${TIMED_SSO_CLIENT_HOST} ) /g" \
22
+ /var/www/html/index.html
23
+
24
+ exec " $@ "
You can’t perform that action at this time.
0 commit comments