fix docker

This commit is contained in:
Saeed Vaziry 2024-03-22 17:02:18 +01:00
parent d4f1a2d4da
commit 4137e2003f
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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"