From a9dbaa77f5f98f586de3305f004097c93616ab64 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Tue, 5 Nov 2024 19:42:02 +0100 Subject: [PATCH] Bug fix: Create SSL directories --- dsql-app/docker-entrypoint.sh | 3 +++ dsql-app/setup.sh | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dsql-app/docker-entrypoint.sh b/dsql-app/docker-entrypoint.sh index 0e6a4fd..118009f 100755 --- a/dsql-app/docker-entrypoint.sh +++ b/dsql-app/docker-entrypoint.sh @@ -4,6 +4,7 @@ cd /app npm install npm update datasquirel +chmod +x init-sql.sh ./init-sql.sh if [[ $? == 0 ]]; then @@ -41,6 +42,8 @@ if [ -n "${NEXT_PUBLIC_DSQL_LOCAL}" ]; then else echo "NEXT_PUBLIC_DSQL_LOCAL is not set." + npm run build + if [ "${DSQL_HOST_ENV}" == "prod_prod" ]; then echo "Main Production Environment" nodecid diff --git a/dsql-app/setup.sh b/dsql-app/setup.sh index ffb6d9a..9fad0a7 100644 --- a/dsql-app/setup.sh +++ b/dsql-app/setup.sh @@ -5,7 +5,13 @@ CA_KEY_FILE="/ssl/ca-key.pem" SERVER_CERT_FILE="/ssl/server-cert.pem" SERVER_CERT_FILE="/ssl/server-key.pem" -ls -laF /ssl +if [ ! -d "/app/ssl" ]; then + mkdir -p "/app/ssl" +fi + +if [ ! -d "/app/public/documents/ssl/" ]; then + mkdir -p "/app/public/documents/ssl/" +fi if [[ -e "$CA_CERT_FILE" && -e "$CA_KEY_FILE" && -e "$SERVER_CERT_FILE" && -e "$SERVER_KEY_FILE" ]]; then echo "SSL Files Present. Moving Forward >>>"