copy public/ to volume
All checks were successful
dockers/pixelfed/pipeline/head This commit looks good

This commit is contained in:
chris 2023-08-10 16:47:22 +02:00
parent f7db2ef12f
commit acfee084c6
2 changed files with 6 additions and 8 deletions

View file

@ -53,8 +53,9 @@ COPY --from=builder /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d
RUN set -xe;\
apt-get update &&\
apt-get upgrade -y &&\
apt-get install --no-install-recommends -y libzip4 libpq5 libmagickwand-6.q16-6 libxpm4 libwebp6 &&\
apt-get install --no-install-recommends -y optipng pngquant jpegoptim gifsicle ffmpeg locales gosu dumb-init &&\
apt-get install --no-install-recommends -y optipng pngquant jpegoptim gifsicle ffmpeg locales gosu dumb-init rsync &&\
apt-get clean all &&\
rm -rf /var/lib/apt/lists/*
@ -65,7 +66,7 @@ RUN set -xe;\
sed -i 's/^upload_max_filesize.*/upload_max_filesize = 100M/g' "$PHP_INI_DIR"/php.ini* &&\
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
WORKDIR /var/www
VOLUME /var/www/storage /var/www/bootstrap
VOLUME /var/www/storage /var/www/bootstrap /public
ENTRYPOINT /entrypoint.sh
LABEL build.date=$DATE

View file

@ -1,11 +1,6 @@
#!/usr/bin/env bash
set -xeo pipefail
if [ ! -z $FORCE_HTTPS ]
then
sed -i 's#</VirtualHost#SetEnv HTTPS on\n</VirtualHost#' /etc/apache2/sites-enabled/000-default.conf
fi
cp -r storage.skel/* storage/
chown -R www-data:www-data storage/ bootstrap/
@ -27,11 +22,13 @@ gosu www-data php artisan cache:clear
gosu www-data php artisan route:cache
gosu www-data php artisan view:cache
rsync --archive --delete public/ /public/
echo "++++ Check for needed migrations... ++++"
# check for migrations
gosu www-data php artisan migrate:status | grep No && migrations=yes || migrations=no
gosu www-data php artisan migrate:status | grep Pending && migrations=yes || migrations=no
if [ $migrations = "yes" ];
if [ "$migrations" = "yes" ];
then
gosu www-data php artisan migrate --force
fi