Merge pull request #552 from TeDomum/dev

Drop privileges when starting artisan or horizon
This commit is contained in:
daniel 2018-11-25 13:51:46 -07:00 committed by GitHub
commit 1832973a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ ARG COMPOSER_VERSION="1.6.5"
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& apt-get install -y --no-install-recommends git gosu \
optipng pngquant jpegoptim gifsicle \
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 \
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libvpx-dev libmagickwand-dev \

View File

@ -2,18 +2,18 @@
# Create the storage tree if needed and fix permissions
cp -r storage.skel/* storage/
chown -R www-data:www-data storage/
chown -R www-data:www-data storage/ bootstrap/cache/
php artisan storage:link
# Migrate database if the app was upgraded
php artisan migrate --force
gosu www-data:www-data php artisan migrate --force
# Run other specific migratins if required
php artisan update
gosu www-data:www-data php artisan update
# Run a worker if it is set as embedded
if [ $HORIZON_EMBED = true ]; then
php artisan horizon &
gosu www-data:www-data php artisan horizon &
fi
# Finally run Apache

View File

@ -38,7 +38,7 @@ services:
# - "app-storage:/var/www/storage"
# networks:
# - internal
# command: php artisan horizon
# command: gosu www-data php artisan horizon
db:
image: mysql:5.7