From 77901a7092017ad2dc1b19b1800a3a0716e44aa1 Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 21:59:13 +0800 Subject: [PATCH 1/7] Update start.sh --- contrib/docker/start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/docker/start.sh b/contrib/docker/start.sh index 3468f519c..2e0d99e60 100755 --- a/contrib/docker/start.sh +++ b/contrib/docker/start.sh @@ -3,7 +3,13 @@ # Create the storage tree if needed and fix permissions cp -r storage.skel/* storage/ chown -R www-data:www-data storage/ bootstrap/ + +# Refresh the environment php artisan storage:link +php artisan horizon:assets +php artisan route:cache +php artisan view:cache +php artisan config:cache # Migrate database if the app was upgraded # gosu www-data:www-data php artisan migrate --force @@ -11,5 +17,10 @@ php artisan storage:link # Run other specific migratins if required # gosu www-data:www-data php artisan update +# Run a worker if it is set as embedded +if [ "$HORIZON_EMBED" = "true" ]; then + gosu www-data:www-data php artisan horizon & +fi + # Finally run Apache exec apache2-foreground From eb66ab3af4bd0719a21562fe6c0917d5f04ed34f Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 22:04:12 +0800 Subject: [PATCH 2/7] Update .env.example --- .env.example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index f5f44745b..725299e28 100644 --- a/.env.example +++ b/.env.example @@ -71,4 +71,5 @@ CS_CW_DOMAINS='example.org,example.net,example.com' CS_UNLISTED_DOMAINS='example.org,example.net,example.com' ## Optional -HORIZON_DARKMODE=true # Horizon theme darkmode +#HORIZON_DARKMODE=false # Horizon theme darkmode +#HORIZON_EMBED=false # Single Docker Container mode From fcbcc2d8fba243ec6e40e6104cbf7c2f7a9881fc Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 22:05:09 +0800 Subject: [PATCH 3/7] Upgrade to PHP 7.3 --- contrib/docker/Dockerfile.apache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docker/Dockerfile.apache b/contrib/docker/Dockerfile.apache index d42602a14..664e7f3cc 100644 --- a/contrib/docker/Dockerfile.apache +++ b/contrib/docker/Dockerfile.apache @@ -1,4 +1,4 @@ -FROM php:7.2-apache +FROM php:7.3-apache ARG COMPOSER_VERSION="1.8.5" ARG COMPOSER_CHECKSUM="4e4c1cd74b54a26618699f3190e6f5fc63bb308b13fa660f71f2a2df047c0e17" From e24dac14d9aa9b0dbf7b9ea1b2b07d40dd6db9ac Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 22:05:45 +0800 Subject: [PATCH 4/7] Update Dockerfile.apache --- contrib/docker/Dockerfile.apache | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/docker/Dockerfile.apache b/contrib/docker/Dockerfile.apache index 664e7f3cc..0da3a7ee9 100644 --- a/contrib/docker/Dockerfile.apache +++ b/contrib/docker/Dockerfile.apache @@ -56,7 +56,6 @@ ENV APP_ENV=production \ DB_HOST=db \ BROADCAST_DRIVER=log \ QUEUE_DRIVER=redis \ - HORIZON_EMBED=TRUE \ HORIZON_PREFIX=horizon-pixelfed \ REDIS_HOST=redis \ SESSION_SECURE_COOKIE=true \ From a5125b92398ef3bf488313da3f8637a49e176318 Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 22:08:45 +0800 Subject: [PATCH 5/7] Update docker-compose.yml --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index f93e77d77..559f0b0d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,11 +16,14 @@ services: # Comment to use dockerhub image build: . image: pixelfed - # If you have a traefik running, uncomment this to expose Pixelfed + ## If you have a traefik running, uncomment this to expose Pixelfed # labels: # - traefik.enable=true # - traefik.frontend.rule=Host:your.url # - traefik.port=80 + ## If you have a standard reverse proxy, uncommit this to expose Pixelfed + # ports: + # - "127.0.0.1:8080:80" env_file: - ./.env volumes: @@ -40,6 +43,7 @@ services: - "app-storage:/var/www/storage" - "app-bootstrap:/var/www/bootstrap" networks: + - external # Required for ActivityPub - internal command: gosu www-data php artisan horizon From 78b97d32387ea72c9d8d85a03252b621a30f803b Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 22:11:50 +0800 Subject: [PATCH 6/7] Force upgrade of curl --- contrib/docker/Dockerfile.apache | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/docker/Dockerfile.apache b/contrib/docker/Dockerfile.apache index 0da3a7ee9..a70c069cd 100644 --- a/contrib/docker/Dockerfile.apache +++ b/contrib/docker/Dockerfile.apache @@ -4,8 +4,9 @@ ARG COMPOSER_VERSION="1.8.5" ARG COMPOSER_CHECKSUM="4e4c1cd74b54a26618699f3190e6f5fc63bb308b13fa660f71f2a2df047c0e17" RUN apt-get update \ + && apt-get install -y --no-install-recommends apt-utils \ && apt-get install -y --no-install-recommends git gosu \ - optipng pngquant jpegoptim gifsicle libpq-dev libsqlite3-dev locales zip unzip libzip-dev \ + optipng pngquant jpegoptim gifsicle libpq-dev libsqlite3-dev locales zip unzip libzip-dev libcurl4-openssl-dev \ libfreetype6 libicu-dev libjpeg62-turbo libpng16-16 libxpm4 libwebp6 libmagickwand-6.q16-3 \ libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libwebp-dev libmagickwand-dev \ && sed -i '/en_US/s/^#//g' /etc/locale.gen \ @@ -16,9 +17,9 @@ RUN apt-get update \ --with-jpeg-dir=/usr/lib/x86_64-linux-gnu/ \ --with-xpm-dir=/usr/lib/x86_64-linux-gnu/ \ --with-webp-dir=/usr/lib/x86_64-linux-gnu/ \ - && docker-php-ext-install pdo_mysql pdo_pgsql pdo_sqlite pcntl gd exif bcmath intl zip \ + && docker-php-ext-install pdo_mysql pdo_pgsql pdo_sqlite pcntl gd exif bcmath intl zip curl \ && pecl install imagick \ - && docker-php-ext-enable imagick pcntl imagick gd exif zip \ + && docker-php-ext-enable imagick pcntl imagick gd exif zip curl \ && a2enmod rewrite remoteip \ && {\ echo RemoteIPHeader X-Real-IP ;\ From 72d4c467bddb42469a4aeab27f6412689da7f659 Mon Sep 17 00:00:00 2001 From: Shleeble Date: Wed, 24 Apr 2019 22:26:13 +0800 Subject: [PATCH 7/7] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 559f0b0d6..bb95c273c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: - external - internal - worker: + worker: # Comment this whole block if HORIZON_EMBED is true. # Comment to use dockerhub image build: . image: pixelfed