-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from privacybydesign/config-template
Add start script & option for config template
- Loading branch information
Showing
5 changed files
with
35 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ src/main/webapp/* | |
!src/main/webapp/WEB-INF/ | ||
|
||
.idea/ | ||
.vscode |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# this is the startup script in the docker container, | ||
# doing a bunch of config at runtime before starting the actual server | ||
|
||
set -e # exit the script immediately when an error is encountered | ||
|
||
# in some cases secrets from different places might be required to be used together | ||
# so this provides the option to provide a config template with some environment variables | ||
echo "creating config.json based on template" | ||
envsubst < /config/config.json > $IRMA_CONF/config.json | ||
|
||
echo "generating binary file for private key" | ||
openssl rsa -in /irma-jwt-key/priv.pem -outform der -out /usr/local/keys/priv.der | ||
|
||
echo "copying config files to web app dir" | ||
for lang in 'en' 'nl'; do | ||
cp /config/config.js /usr/local/tomee/webapps/ROOT/$lang/assets/config.js; | ||
done | ||
|
||
|
||
echo "starting up server" | ||
exec catalina.sh run |