reconfigure

This commit is contained in:
jannah 2025-03-27 07:38:29 +00:00
parent 54c1b5554e
commit ee512ae007
3 changed files with 11 additions and 1 deletions

View File

@ -15,10 +15,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
WORKDIR /var/www/html WORKDIR /var/www/html
COPY ./laravel . COPY ./laravel/composer.* ./
RUN composer install --no-scripts --no-interaction RUN composer install --no-scripts --no-interaction
COPY ./laravel .
RUN chown -R www-data:www-data /var/www/html RUN chown -R www-data:www-data /var/www/html
RUN chmod -R 775 /var/www/html/storage RUN chmod -R 775 /var/www/html/storage

View File

@ -22,6 +22,7 @@ services:
condition: service_healthy condition: service_healthy
volumes: volumes:
- ./laravel:/var/www/html - ./laravel:/var/www/html
- /var/www/html/vendor
environment: environment:
- DB_HOST=mysql - DB_HOST=mysql
- DB_PORT=3306 - DB_PORT=3306

View File

@ -1,6 +1,13 @@
#!/bin/bash #!/bin/bash
set -e set -e
# Create .env if missing
if [ ! -f /var/www/html/.env ]; then
cp /var/www/html/.env.example /var/www/html/.env
php artisan key:generate
fi
# Fix ownership and permissions # Fix ownership and permissions
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache