Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions resources/create-certs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh
#see https://docs.docker.com/engine/security/https/
set -e

if [ "$DEBUG" = "true" ]; then
set -x
fi

EXPIRATIONDAYS=700
CASUBJSTRING="/C=GB/ST=London/L=London/O=ExampleCompany/OU=IT/CN=example.com/[email protected]"
Expand Down
10 changes: 9 additions & 1 deletion resources/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/bin/sh
set -e

if [ "$DEBUG" = "true" ]; then
set -x
fi

if [ -n "$CERTS_PASSWORD_FILE" ]; then
echo "Using cert password from $CERTS_PASSWORD_FILE"
CREATE_CERTS_WITH_PW="$(cat $CERTS_PASSWORD_FILE)"
fi

if [ -n $CREATE_CERTS_WITH_PW ]; then
if [ -n "$CREATE_CERTS_WITH_PW" ]; then
if [ -z "$(ls -A $CERTS_DIR)" ]; then

echo "Create CA cert"
Expand All @@ -26,4 +31,7 @@ if [ -n $CREATE_CERTS_WITH_PW ]; then

echo "$CERTS_DIR is not empty. Not creating certs."
fi

else
echo "CREATE_CERTS_WITH_PW is not set. Not creating certs."
fi
Loading