From 4137e2003ff4e6ab98c419efb8da66035e349af1 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Fri, 22 Mar 2024 17:02:18 +0100 Subject: [PATCH] fix docker --- docker/Dockerfile | 2 +- docker/nginx.conf | 2 +- docker/start.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 91ce068..b17f41a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,7 @@ RUN apt update \ && add-apt-repository ppa:ondrej/php -y \ && apt update \ && apt install -y php8.2 php8.2-fpm php8.2-mbstring php8.2-mcrypt php8.2-gd php8.2-xml \ - php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.3-sqlite3 + php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.2-sqlite3 COPY docker/php.ini /etc/php/8.2/cli/conf.d/99-vito.ini # composer diff --git a/docker/nginx.conf b/docker/nginx.conf index 1633f13..3a8e20c 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -17,7 +17,7 @@ server { location ~ \.php$ { include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } diff --git a/docker/start.sh b/docker/start.sh index 686efcd..23299bb 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,9 +1,8 @@ #!/bin/bash INIT_FLAG="/var/www/html/storage/.INIT_ENV" -DB_PASSWORD=${DB_PASSWORD:-"password"} NAME=${NAME:-"vito"} -EMAIL=${EMAIL:-"vito@example.com"} +EMAIL=${EMAIL:-"vito@vitodeploy.com"} PASSWORD=${PASSWORD:-"password"} # check if the flag file does not exist, indicating a first run @@ -22,6 +21,8 @@ if [ ! -f "$INIT_FLAG" ]; then touch "$INIT_FLAG" fi +chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache service php8.2-fpm start service nginx start @@ -33,7 +34,6 @@ php /var/www/html/artisan route:clear php /var/www/html/artisan route:cache php /var/www/html/artisan view:clear php /var/www/html/artisan view:cache -php /var/www/html/artisan icons:cache php /var/www/html/artisan user:create "$NAME" "$EMAIL" "$PASSWORD"