diff --git a/Dockerfile b/Dockerfile index 5b1d542..f6b1342 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/composer.json b/composer.json index fa46fd9..4457d30 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index 825c9b6..4bcafc8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d538102e415c078c12d13eeabdd794f2", + "content-hash": "c095195fa98e470f1898a6080097a18a", "packages": [ { "name": "doctrine/cache", @@ -5947,16 +5947,16 @@ }, { "name": "laravel-fans/docker", - "version": "0.3.1", + "version": "0.3.2", "source": { "type": "git", "url": "https://github.com/laravel-fans/laravel-docker.git", - "reference": "128ffc2dae982e06ec404254276d7b72a6690023" + "reference": "f654a3655fade94c5e09f98418c02140021a4de4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-fans/laravel-docker/zipball/128ffc2dae982e06ec404254276d7b72a6690023", - "reference": "128ffc2dae982e06ec404254276d7b72a6690023", + "url": "https://api.github.com/repos/laravel-fans/laravel-docker/zipball/f654a3655fade94c5e09f98418c02140021a4de4", + "reference": "f654a3655fade94c5e09f98418c02140021a4de4", "shasum": "" }, "require": { @@ -5991,9 +5991,9 @@ "description": "Full Laravel production environment for Docker", "support": { "issues": "https://github.com/laravel-fans/laravel-docker/issues", - "source": "https://github.com/laravel-fans/laravel-docker/tree/0.3.1" + "source": "https://github.com/laravel-fans/laravel-docker/tree/0.3.2" }, - "time": "2021-04-19T08:25:13+00:00" + "time": "2021-04-25T02:19:42+00:00" }, { "name": "mockery/mockery", diff --git a/docker/usr/local/bin/docker-laravel-entrypoint b/docker/usr/local/bin/docker-laravel-entrypoint index 2a87b78..c22ec10 100755 --- a/docker/usr/local/bin/docker-laravel-entrypoint +++ b/docker/usr/local/bin/docker-laravel-entrypoint @@ -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/