mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-18 12:24:09 +01:00
Ensure permissions on volumes are correct
mv public directory inside a single RUN to not increase the image
This commit is contained in:
19
debian/scripts/init.sh
vendored
19
debian/scripts/init.sh
vendored
@@ -29,10 +29,23 @@ docker_process_init_files() {
|
||||
done
|
||||
}
|
||||
|
||||
# Workaround for application updates
|
||||
rm -rf /var/www/html/public/*
|
||||
mv /tmp/public/* /var/www/html/public/
|
||||
|
||||
# Create upload directory
|
||||
mkdir -p /var/www/html/public/uploads
|
||||
|
||||
# Ensure owner, file and directory permissions are correct
|
||||
chown -R www-data:www-data /var/www/html/
|
||||
find /var/www/html/ -type f -exec chmod 644 {} \;
|
||||
find /var/www/html/ -type d -exec chmod 755 {} \;
|
||||
chown -R www-data:www-data \
|
||||
/var/www/html/storage \
|
||||
/var/www/html/public
|
||||
find /var/www/html/storage \
|
||||
/var/www/html/public \
|
||||
-type f -exec chmod 644 {} \;
|
||||
find /var/www/html/storage \
|
||||
/var/www/html/public \
|
||||
-type d -exec chmod 755 {} \;
|
||||
|
||||
# Clear and cache config in production
|
||||
if [ "$APP_ENV" = "production" ]; then
|
||||
|
||||
Reference in New Issue
Block a user