From 8b4b5d39deb0fecaaf9af03ed3f69303f8aeb583 Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Thu, 19 Sep 2024 10:44:30 +0200 Subject: [PATCH] fix(prestashop): display full url on start and untangle env vars --- images/prestashop/Dockerfile | 11 ++++++----- images/prestashop/scripts/entrypoint.sh | 8 ++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/images/prestashop/Dockerfile b/images/prestashop/Dockerfile index 7139efe..4c400e3 100644 --- a/images/prestashop/Dockerfile +++ b/images/prestashop/Dockerfile @@ -96,17 +96,18 @@ COPY ./config/php-fpm /usr/local/etc/php-fpm.d COPY ./config/php /usr/local/etc/php COPY ./scripts/ /tmp/scripts +ENV PHP_VERSION=${PHP_VERSION} ENV PS_VERSION=${PS_VERSION} -ENV ROOT_DIR=${ROOT_DIR} - - ### # Core ### ENV BASE_URL=prestashop.dev.myparcel.nl ENV FULL_URL=https://${BASE_URL} -ENV ROOT_DIR=/var/www/html +ENV ROOT_DIR=${ROOT_DIR} + +ENV TMP_MODULES_DIR="/tmp/modules" +ENV PS_MODULES_DIR="$ROOT_DIR/modules" ### # Database @@ -133,7 +134,7 @@ ENV PS_FOLDER_ADMIN=admin1 # Admin credentials ENV PS_ADMIN_MAIL=admin@${BASE_URL} -ENV PS_ADMIN_PASSWORD=admin +ENV PS_ADMIN_PASSWORD=admin123! ### diff --git a/images/prestashop/scripts/entrypoint.sh b/images/prestashop/scripts/entrypoint.sh index 5f88858..da1b9ae 100755 --- a/images/prestashop/scripts/entrypoint.sh +++ b/images/prestashop/scripts/entrypoint.sh @@ -1,8 +1,5 @@ #!/bin/bash -export TMP_MODULES_DIR="/tmp/modules" -export PS_MODULES_DIR="$ROOT_DIR/modules" - for script in /tmp/scripts/_*; do source $script; done # Start php fpm in the background in advance. @@ -18,7 +15,6 @@ warmup-cache reset-permissions -tail-logs - h1 "🐧 PrestaShop is ready at ${FULL_URL} ✨" -sleep infinity + +tail-logs