build(develop): fix chown and chmod
This commit is contained in:
parent
5b43cb6f5a
commit
7b96b8dfb4
@ -2,10 +2,14 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
|
||||||
docker compose build
|
docker compose build
|
||||||
|
|
||||||
if [ !-f .env ]; then
|
if [ ! -f .env ]; then
|
||||||
|
echo "creating new env file"
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
else
|
||||||
|
echo "env file exists ... ignoring copy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# composer
|
# composer
|
||||||
@ -18,6 +22,9 @@ docker compose run -it php-fpm /var/www/html/artisan db:seed CountrySeeder
|
|||||||
# laravel Swagger
|
# laravel Swagger
|
||||||
docker compose run -it php-fpm /var/www/html/artisan l5-swagger:generate
|
docker compose run -it php-fpm /var/www/html/artisan l5-swagger:generate
|
||||||
|
|
||||||
|
# fix permissions (TODO: fix-me)
|
||||||
|
docker compose run -it php-fpm /bin/sh -c "chown -R www-data:www-data /var/www/html/storage && find /var/www/html/storage -type d -exec chmod 775 '{}' ';' && if [ -d /var/www/html/bootstrap/cache ]; then find /var/www/html/bootstrap/cache -not -name '.gitignore' -exec chmod 777 '{}' ';'; fi"
|
||||||
|
|
||||||
# run containers (and build again)
|
# run containers (and build again)
|
||||||
if [ "$NO_EXECUTE" != "1" ]; then
|
if [ "$NO_EXECUTE" != "1" ]; then
|
||||||
docker compose up --build
|
docker compose up --build
|
||||||
|
Loading…
Reference in New Issue
Block a user