post-start script add API download permission fix
This commit is contained in:
parent
84fa5ca830
commit
8ad679689b
|
@ -83,7 +83,7 @@ docker exec php-fpm bash -c "cd /vhost; composer install" >/dev/null 2>&1 && ech
|
||||||
|
|
||||||
# 2. Re-build js/scss
|
# 2. Re-build js/scss
|
||||||
echo -n " * Webpack build.............";
|
echo -n " * Webpack build.............";
|
||||||
docker exec php-fpm bash -c "cd /vhost; npm install; npm run build" >/dev/null 2>&1 && echo "built" || (echo "failed"; exit 1);
|
docker exec php-fpm bash -c "cd /vhost; npm install; npm update; npm run build" >/dev/null 2>&1 && echo "built" || (echo "failed"; exit 1);
|
||||||
|
|
||||||
# 3. touch the file the backup loop will use to run
|
# 3. touch the file the backup loop will use to run
|
||||||
echo -n " * Mariadb backup loop.......";
|
echo -n " * Mariadb backup loop.......";
|
||||||
|
@ -103,3 +103,19 @@ backup(){
|
||||||
|
|
||||||
backup &
|
backup &
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [5] Setup/Fix permissions (for API download)
|
||||||
|
|
||||||
|
# 1. Create download directories
|
||||||
|
echo -n " * Create download folders...";
|
||||||
|
docker exec php-fpm bash -c "mkdir -p /vhost/tmp";
|
||||||
|
docker exec php-fpm bash -c "mkdir -p /vhost/public_html/tmp";
|
||||||
|
echo "created"
|
||||||
|
|
||||||
|
# 2. Fix permissions
|
||||||
|
echo -n " * Setup permissions.........";
|
||||||
|
docker exec php-fpm bash -c "chown -R www-data:www-data /vhost";
|
||||||
|
docker exec php-fpm bash -c "chmod -R 775 /vhost";
|
||||||
|
echo "set"
|
Loading…
Reference in New Issue