This commit is contained in:
parent
fec5542019
commit
166d4987c6
20
Dockerfile
20
Dockerfile
@ -25,16 +25,20 @@ WORKDIR /var/www
|
||||
COPY . .
|
||||
COPY .env.example .env
|
||||
|
||||
# Install dependencies
|
||||
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
|
||||
# Set www-data user permission before running composer/install artisan
|
||||
RUN chown -R www-data:www-data /var/www
|
||||
|
||||
# Generate app key
|
||||
RUN php artisan key:generate
|
||||
USER www-data
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R www-data:www-data /var/www \
|
||||
&& chmod -R 775 storage bootstrap/cache \
|
||||
&& chown -R www-data:www-data storage bootstrap/cache
|
||||
# Install dependencies & generate app key as www-data user
|
||||
RUN composer install --no-interaction --prefer-dist --optimize-autoloader \
|
||||
&& php artisan key:generate
|
||||
|
||||
USER root
|
||||
|
||||
# Set permissions again just in case
|
||||
RUN chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache \
|
||||
&& chmod -R 775 /var/www/storage /var/www/bootstrap/cache
|
||||
|
||||
EXPOSE 9000
|
||||
CMD ["php-fpm"]
|
||||
Loading…
x
Reference in New Issue
Block a user