Copy storage over, cache before horizon

This commit is contained in:
asonix 2020-01-15 14:57:25 -06:00
parent 7b40528ce5
commit 7e12d97855
3 changed files with 15 additions and 7 deletions

View file

@ -100,12 +100,6 @@ RUN apt-get update; \
apt-get install -y pngquant jpegoptim optipng tini unzip; \
rm -rf /var/lib/apt/lists/*
COPY pixelfed /usr/local/bin/pixelfed
COPY pixelfed-run /usr/local/bin/pixelfed-run
COPY pixelfed-startup /usr/local/bin/pixelfed-startup
COPY pixelfed-migrate /usr/local/bin/pixelfed-migrate
COPY pixelfed-garbage /usr/local/bin/pixelfed-garbage
USER www-data
WORKDIR /var/www/pixelfed
@ -117,8 +111,17 @@ RUN composer install \
--no-scripts \
--no-progress
RUN cp -r storage storage-default
USER root
COPY pixelfed /usr/local/bin/pixelfed
COPY pixelfed-run /usr/local/bin/pixelfed-run
COPY pixelfed-horizon /usr/local/bin/pixelfed-horizon
COPY pixelfed-startup /usr/local/bin/pixelfed-startup
COPY pixelfed-migrate /usr/local/bin/pixelfed-migrate
COPY pixelfed-garbage /usr/local/bin/pixelfed-garbage
VOLUME /var/www/pixelfed/storage
ENTRYPOINT ["/usr/bin/tini", "--"]

4
pixelfed/pixelfed-horizon Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
pixelfed 'php artisan config:cache'
pixelfed 'php artisan horizon'

View file

@ -2,12 +2,13 @@
set -xe
pixelfed 'rsync -rog storage-default/* storage/'
pixelfed 'php artisan config:cache'
pixelfed 'php artisan horizon:install'
pixelfed 'php artisan horizon:assets'
pixelfed 'php artisan route:cache'
pixelfed 'php artisan view:cache'
pixelfed 'php artisan media:optimize'
pixelfed 'php artisan config:cache'
pixelfed 'php artisan optimize'
exec "$@"