From 17b0b623cae94bf9abed2649a9520fae2b54bba0 Mon Sep 17 00:00:00 2001 From: Programster Date: Sun, 19 Feb 2017 14:04:08 +0000 Subject: [PATCH] Need to ensure volume subdirectories get created with necessary permissions. --- docker/startup.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/startup.sh b/docker/startup.sh index 7c28cb2..e535774 100755 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -3,11 +3,15 @@ # Have supervisor manage the apache process instead service apache2 stop -# Make sure I have permissions to the volumes +# Make sure I have permissions to the volumes and the necessary folders exist. +mkdir -p /uploads/big +mkdir -p /uploads/import +mkdir -p /uploads/medium +mkdir -p /uploads/thumb chown root:www-data -R /var/www/lychee/data chown root:www-data -R /var/www/lychee/uploads -chmod 770 /var/www/lychee/uploads -chmod 770 /var/www/lychee/data +chmod 770 -R /var/www/lychee/uploads +chmod 770 -R /var/www/lychee/data # Here is a good point to run database migrations (before the webserver is started up by supervisord) #/usr/bin/php /var/www/lychee/scripts/migrate.php