mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 17:26:43 +00:00
commit
d92d9ddaf0
4 changed files with 24 additions and 8 deletions
|
@ -71,4 +71,5 @@ CS_CW_DOMAINS='example.org,example.net,example.com'
|
||||||
CS_UNLISTED_DOMAINS='example.org,example.net,example.com'
|
CS_UNLISTED_DOMAINS='example.org,example.net,example.com'
|
||||||
|
|
||||||
## Optional
|
## Optional
|
||||||
HORIZON_DARKMODE=true # Horizon theme darkmode
|
#HORIZON_DARKMODE=false # Horizon theme darkmode
|
||||||
|
#HORIZON_EMBED=false # Single Docker Container mode
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
FROM php:7.2-apache
|
FROM php:7.3-apache
|
||||||
|
|
||||||
ARG COMPOSER_VERSION="1.8.5"
|
ARG COMPOSER_VERSION="1.8.5"
|
||||||
ARG COMPOSER_CHECKSUM="4e4c1cd74b54a26618699f3190e6f5fc63bb308b13fa660f71f2a2df047c0e17"
|
ARG COMPOSER_CHECKSUM="4e4c1cd74b54a26618699f3190e6f5fc63bb308b13fa660f71f2a2df047c0e17"
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends apt-utils \
|
||||||
&& apt-get install -y --no-install-recommends git gosu \
|
&& 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 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 \
|
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libwebp-dev libmagickwand-dev \
|
||||||
&& sed -i '/en_US/s/^#//g' /etc/locale.gen \
|
&& 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-jpeg-dir=/usr/lib/x86_64-linux-gnu/ \
|
||||||
--with-xpm-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/ \
|
--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 \
|
&& 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 \
|
&& a2enmod rewrite remoteip \
|
||||||
&& {\
|
&& {\
|
||||||
echo RemoteIPHeader X-Real-IP ;\
|
echo RemoteIPHeader X-Real-IP ;\
|
||||||
|
@ -56,7 +57,6 @@ ENV APP_ENV=production \
|
||||||
DB_HOST=db \
|
DB_HOST=db \
|
||||||
BROADCAST_DRIVER=log \
|
BROADCAST_DRIVER=log \
|
||||||
QUEUE_DRIVER=redis \
|
QUEUE_DRIVER=redis \
|
||||||
HORIZON_EMBED=TRUE \
|
|
||||||
HORIZON_PREFIX=horizon-pixelfed \
|
HORIZON_PREFIX=horizon-pixelfed \
|
||||||
REDIS_HOST=redis \
|
REDIS_HOST=redis \
|
||||||
SESSION_SECURE_COOKIE=true \
|
SESSION_SECURE_COOKIE=true \
|
||||||
|
|
|
@ -3,7 +3,13 @@
|
||||||
# Create the storage tree if needed and fix permissions
|
# Create the storage tree if needed and fix permissions
|
||||||
cp -r storage.skel/* storage/
|
cp -r storage.skel/* storage/
|
||||||
chown -R www-data:www-data storage/ bootstrap/
|
chown -R www-data:www-data storage/ bootstrap/
|
||||||
|
|
||||||
|
# Refresh the environment
|
||||||
php artisan storage:link
|
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
|
# Migrate database if the app was upgraded
|
||||||
# gosu www-data:www-data php artisan migrate --force
|
# gosu www-data:www-data php artisan migrate --force
|
||||||
|
@ -11,5 +17,10 @@ php artisan storage:link
|
||||||
# Run other specific migratins if required
|
# Run other specific migratins if required
|
||||||
# gosu www-data:www-data 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
|
||||||
|
gosu www-data:www-data php artisan horizon &
|
||||||
|
fi
|
||||||
|
|
||||||
# Finally run Apache
|
# Finally run Apache
|
||||||
exec apache2-foreground
|
exec apache2-foreground
|
||||||
|
|
|
@ -16,11 +16,14 @@ services:
|
||||||
# Comment to use dockerhub image
|
# Comment to use dockerhub image
|
||||||
build: .
|
build: .
|
||||||
image: pixelfed
|
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:
|
# labels:
|
||||||
# - traefik.enable=true
|
# - traefik.enable=true
|
||||||
# - traefik.frontend.rule=Host:your.url
|
# - traefik.frontend.rule=Host:your.url
|
||||||
# - traefik.port=80
|
# - 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_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -30,7 +33,7 @@ services:
|
||||||
- external
|
- external
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
worker:
|
worker: # Comment this whole block if HORIZON_EMBED is true.
|
||||||
# Comment to use dockerhub image
|
# Comment to use dockerhub image
|
||||||
build: .
|
build: .
|
||||||
image: pixelfed
|
image: pixelfed
|
||||||
|
@ -40,6 +43,7 @@ services:
|
||||||
- "app-storage:/var/www/storage"
|
- "app-storage:/var/www/storage"
|
||||||
- "app-bootstrap:/var/www/bootstrap"
|
- "app-bootstrap:/var/www/bootstrap"
|
||||||
networks:
|
networks:
|
||||||
|
- external # Required for ActivityPub
|
||||||
- internal
|
- internal
|
||||||
command: gosu www-data php artisan horizon
|
command: gosu www-data php artisan horizon
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue