Add bookstack user

This commit is contained in:
TBK 2020-04-08 09:23:28 +02:00
parent e6784c2e5e
commit 8689818ac9
No known key found for this signature in database
GPG Key ID: 6D4FD19CB66C95EA
2 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,8 @@ RUN set -ex \
# 82 is the standard uid/gid for "www-data" in Alpine # 82 is the standard uid/gid for "www-data" in Alpine
&& addgroup -g 82 -S www-data \ && addgroup -g 82 -S www-data \
&& adduser -u 82 -D -S -G www-data www-data \ && adduser -u 82 -D -S -G www-data www-data \
&& addgroup -S bookstack \
&& adduser -S -D -H -s /sbin/nologin -G bookstack -g bookstack bookstack \
&& apk update \ && apk update \
&& echo "Setting up PHP extensions" \ && echo "Setting up PHP extensions" \
&& apk add --no-cache \ && apk add --no-cache \
@ -73,7 +75,7 @@ RUN set -ex \
&& echo "Get Dependencies:" \ && echo "Get Dependencies:" \
&& composer install \ && composer install \
&& echo "Changing ownership:" \ && echo "Changing ownership:" \
&& chown www-data:www-data -R . \ && chown bookstack:bookstack -R . \
&& echo "Ensure www-data got access to Nginx folders:" \ && echo "Ensure www-data got access to Nginx folders:" \
&& chown www-data:www-data -R /var/lib/nginx /var/log/nginx && chown www-data:www-data -R /var/lib/nginx /var/log/nginx

View File

@ -6,8 +6,8 @@ if [ ! -f /app/.env ]; then
fi fi
php artisan migrate --no-interaction --force php artisan migrate --no-interaction --force
echo "Setting folder permissions for uploads:" echo "Setting folder permissions for www-data:"
chown -R www-data:www-data bootstrap/cache public/uploads storage/uploads chown -R www-data:bookstack bootstrap/cache public/uploads storage
php artisan cache:clear php artisan cache:clear
php artisan view:clear php artisan view:clear