Skip to content

Commit

Permalink
perf: update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkcup committed Apr 25, 2021
1 parent 3c15fef commit 1df8f2e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ RUN npm install
COPY docker/ /
RUN a2enmod rewrite headers \
&& a2ensite laravel \
&& a2dissite 000-default
&& a2dissite 000-default \
&& chmod +x /usr/local/bin/docker-laravel-entrypoint

COPY . /var/www/laravel
RUN composer install --optimize-autoloader --no-dev \
&& npm run production

RUN chown www-data:www-data bootstrap/cache \
&& chown -R www-data:www-data storage/ \
&& chmod +x /usr/local/bin/docker-laravel-entrypoint

CMD ["docker-laravel-entrypoint"]
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"barryvdh/laravel-ide-helper": "^2.6",
"facade/ignition": "^1.16.4",
"fakerphp/faker": "^1.9.1",
"laravel-fans/docker": "^0.3.1",
"laravel-fans/docker": "^0.3.2",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"php-mock/php-mock": "^2.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docker/usr/local/bin/docker-laravel-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ env=${APP_ENV:-production}

cd /var/www/laravel

chown www-data:www-data bootstrap/cache
chown -R www-data:www-data storage/

if [[ "$DB_CONNECTION" = "sqlite" ]]; then
touch database/database.sqlite
chown -R www-data:www-data database/
Expand Down

0 comments on commit 1df8f2e

Please sign in to comment.