reconfigure
This commit is contained in:
parent
54c1b5554e
commit
ee512ae007
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue