From 0f91f45c940009cc350ba75c7c2668c723d1b9af Mon Sep 17 00:00:00 2001 From: SFDKHISSI Date: Tue, 25 Jun 2024 11:46:21 +0200 Subject: [PATCH] changed the entrypoint to reflect permission change --- dev-entrypoint.sh | 15 +++++---- prod-entrypoint.sh | 32 +++++++++---------- .../reminderEmailToAdmin.html.twig | 0 3 files changed, 23 insertions(+), 24 deletions(-) mode change 100644 => 100755 templates/services/email_templates/reminderEmailToAdmin.html.twig diff --git a/dev-entrypoint.sh b/dev-entrypoint.sh index 92bd037..521cca2 100755 --- a/dev-entrypoint.sh +++ b/dev-entrypoint.sh @@ -2,20 +2,22 @@ # Install the app dependencies composer install; -composer update -W; yarn install; -yarn upgrade -W; composer clear-cache; -# Set the permissions -chmod 777 . -R; - # Clear the cache php bin/console cache:clear --no-warmup --env=dev; # Warm up the cache php bin/console cache:warmup --env=dev; + +# Set the permissions +chmod -R 777 /var/www/var/cache/prod/pools +chown -R www-data:www-data /var/www/var/cache/dev/pools; + +chmod 777 . -R; + # Remove old migrations folder and files rm -rf migrations; @@ -28,5 +30,4 @@ php bin/console doctrine:migrations:migrate; # Build the assets and start the server exec apache2-foreground & -yarn watch - +yarn encore dev --watch diff --git a/prod-entrypoint.sh b/prod-entrypoint.sh index d88baa4..c4f357f 100755 --- a/prod-entrypoint.sh +++ b/prod-entrypoint.sh @@ -1,27 +1,25 @@ #!/bin/sh -# Entrypoint scritp destined to the production environment -# Install the app dependencies -composer install --no-dev --optimize-autoloader; -yarn install --production; -composer clear-cache; +# Entrypoint script destined to the production environment -# Set the permissions and clear the cache -chmod 777 . -R ; -php bin/console cache:clear --no-warmup --env=prod; +# Install the app dependencies +composer install --no-dev --optimize-autoloader +yarn install --production +composer clear-cache -# Warm up the cache -php bin/console cache:warmup --env=prod; +# Clear and warm up the cache +php bin/console cache:clear --no-warmup --env=prod +php bin/console cache:warmup --env=prod -# # Create the migrations directory -# mkdir -p migrations; -# # Create the database and run the migrations -# php bin/console make:migration; -# php bin/console doctrine:migrations:migrate; +# Set the permissions +chmod -R 777 /var/www/var/cache/prod/pools +chown -R www-data:www-data /var/www/var/cache/prod + +chmod -R 777 . # Build the assets -yarn run encore production --progress; +yarn run encore production --progress # Start the server -exec apache2-foreground; \ No newline at end of file +exec apache2-foreground \ No newline at end of file diff --git a/templates/services/email_templates/reminderEmailToAdmin.html.twig b/templates/services/email_templates/reminderEmailToAdmin.html.twig old mode 100644 new mode 100755