mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Merge pull request #1169 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
13e5543eff
5 changed files with 46 additions and 41 deletions
16
.env.example
16
.env.example
|
@ -6,6 +6,9 @@ APP_URL=http://localhost
|
||||||
|
|
||||||
ADMIN_DOMAIN="localhost"
|
ADMIN_DOMAIN="localhost"
|
||||||
APP_DOMAIN="localhost"
|
APP_DOMAIN="localhost"
|
||||||
|
SESSION_DOMAIN="localhost"
|
||||||
|
SESSION_SECURE_COOKIE=true
|
||||||
|
TRUST_PROXIES="*"
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
@ -35,8 +38,6 @@ MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM_ADDRESS="pixelfed@example.com"
|
MAIL_FROM_ADDRESS="pixelfed@example.com"
|
||||||
MAIL_FROM_NAME="Pixelfed"
|
MAIL_FROM_NAME="Pixelfed"
|
||||||
|
|
||||||
SESSION_DOMAIN="${APP_DOMAIN}"
|
|
||||||
SESSION_SECURE_COOKIE=true
|
|
||||||
API_BASE="/api/1/"
|
API_BASE="/api/1/"
|
||||||
API_SEARCH="/api/search"
|
API_SEARCH="/api/search"
|
||||||
|
|
||||||
|
@ -54,19 +55,20 @@ MIX_APP_URL="${APP_URL}"
|
||||||
MIX_API_BASE="${API_BASE}"
|
MIX_API_BASE="${API_BASE}"
|
||||||
MIX_API_SEARCH="${API_SEARCH}"
|
MIX_API_SEARCH="${API_SEARCH}"
|
||||||
|
|
||||||
|
ACTIVITY_PUB=false
|
||||||
|
REMOTE_FOLLOW=false
|
||||||
ACTIVITYPUB_INBOX=false
|
ACTIVITYPUB_INBOX=false
|
||||||
ACTIVITYPUB_SHAREDINBOX=false
|
ACTIVITYPUB_SHAREDINBOX=false
|
||||||
HORIZON_DARKMODE=true
|
# Set these "true" to enable federation.
|
||||||
|
|
||||||
# Set these both "true" to enable federation.
|
|
||||||
# You might need to also run:
|
# You might need to also run:
|
||||||
# php artisan cache:clear
|
# php artisan cache:clear
|
||||||
# php artisan optimize:clear
|
# php artisan optimize:clear
|
||||||
# php artisan optimize
|
# php artisan optimize
|
||||||
ACTIVITY_PUB=false
|
|
||||||
REMOTE_FOLLOW=false
|
|
||||||
|
|
||||||
PF_COSTAR_ENABLED=false
|
PF_COSTAR_ENABLED=false
|
||||||
CS_BLOCKED_DOMAINS='example.org,example.net,example.com'
|
CS_BLOCKED_DOMAINS='example.org,example.net,example.com'
|
||||||
CS_CW_DOMAINS='example.org,example.net,example.com'
|
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
|
||||||
|
HORIZON_DARKMODE=true # Horizon theme darkmode
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
FROM php:7.2-apache
|
FROM php:7.2-apache
|
||||||
|
|
||||||
ARG COMPOSER_VERSION="1.6.5"
|
ARG COMPOSER_VERSION="1.8.5"
|
||||||
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"
|
ARG COMPOSER_CHECKSUM="4e4c1cd74b54a26618699f3190e6f5fc63bb308b13fa660f71f2a2df047c0e17"
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends git gosu \
|
&& apt-get install -y --no-install-recommends git gosu \
|
||||||
optipng pngquant jpegoptim gifsicle \
|
optipng pngquant jpegoptim gifsicle libpq-dev libsqlite3-dev locales zip unzip libzip-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 \
|
||||||
|
&& locale-gen && update-locale \
|
||||||
&& docker-php-source extract \
|
&& docker-php-source extract \
|
||||||
&& docker-php-ext-configure gd \
|
&& docker-php-ext-configure gd \
|
||||||
--with-freetype-dir=/usr/lib/x86_64-linux-gnu/ \
|
--with-freetype-dir=/usr/lib/x86_64-linux-gnu/ \
|
||||||
--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 pcntl gd exif bcmath intl \
|
&& docker-php-ext-install pdo_mysql pdo_pgsql pdo_sqlite pcntl gd exif bcmath intl zip \
|
||||||
&& pecl install imagick \
|
&& pecl install imagick \
|
||||||
&& docker-php-ext-enable imagick pcntl imagick gd exif \
|
&& docker-php-ext-enable imagick pcntl imagick gd exif zip \
|
||||||
&& a2enmod rewrite remoteip \
|
&& a2enmod rewrite remoteip \
|
||||||
&& {\
|
&& {\
|
||||||
echo RemoteIPHeader X-Real-IP ;\
|
echo RemoteIPHeader X-Real-IP ;\
|
||||||
|
@ -44,7 +46,7 @@ RUN cp -r storage storage.skel \
|
||||||
&& composer install --prefer-source --no-interaction \
|
&& composer install --prefer-source --no-interaction \
|
||||||
&& rm -rf html && ln -s public html
|
&& rm -rf html && ln -s public html
|
||||||
|
|
||||||
VOLUME ["/var/www/storage"]
|
VOLUME /var/www/storage /var/www/bootstrap
|
||||||
|
|
||||||
ENV APP_ENV=production \
|
ENV APP_ENV=production \
|
||||||
APP_DEBUG=false \
|
APP_DEBUG=false \
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
FROM php:7.2-fpm
|
FROM php:7.2-fpm
|
||||||
|
|
||||||
ARG COMPOSER_VERSION="1.6.5"
|
ARG COMPOSER_VERSION="1.8.5"
|
||||||
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"
|
ARG COMPOSER_CHECKSUM="4e4c1cd74b54a26618699f3190e6f5fc63bb308b13fa660f71f2a2df047c0e17"
|
||||||
|
|
||||||
RUN apt-get update \
|
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 \
|
optipng pngquant jpegoptim gifsicle libpq-dev libsqlite3-dev locales zip unzip libzip-dev \
|
||||||
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 \
|
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 \
|
||||||
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libvpx-dev libmagickwand-dev \
|
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libvpx-dev libmagickwand-dev \
|
||||||
|
&& sed -i '/en_US/s/^#//g' /etc/locale.gen \
|
||||||
|
&& locale-gen && update-locale \
|
||||||
&& docker-php-source extract \
|
&& docker-php-source extract \
|
||||||
&& docker-php-ext-configure gd \
|
&& docker-php-ext-configure gd \
|
||||||
--with-freetype-dir=/usr/lib/x86_64-linux-gnu/ \
|
--with-freetype-dir=/usr/lib/x86_64-linux-gnu/ \
|
||||||
--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-vpx-dir=/usr/lib/x86_64-linux-gnu/ \
|
--with-vpx-dir=/usr/lib/x86_64-linux-gnu/ \
|
||||||
&& docker-php-ext-install pdo_mysql pcntl gd exif bcmath \
|
&& docker-php-ext-install pdo_mysql pdo_pgsql pdo_sqlite pcntl gd exif bcmath intl zip \
|
||||||
&& pecl install imagick \
|
&& pecl install imagick \
|
||||||
&& docker-php-ext-enable imagick pcntl imagick gd exif \
|
&& docker-php-ext-enable imagick pcntl imagick gd exif zip \
|
||||||
&& curl -LsS https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar -o /usr/bin/composer \
|
&& curl -LsS https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar -o /usr/bin/composer \
|
||||||
&& echo "${COMPOSER_CHECKSUM} /usr/bin/composer" | sha256sum -c - \
|
&& echo "${COMPOSER_CHECKSUM} /usr/bin/composer" | sha256sum -c - \
|
||||||
&& chmod 755 /usr/bin/composer \
|
&& chmod 755 /usr/bin/composer \
|
||||||
|
@ -35,7 +37,7 @@ RUN cp -r storage storage.skel \
|
||||||
&& composer install --prefer-dist --no-interaction \
|
&& composer install --prefer-dist --no-interaction \
|
||||||
&& rm -rf html && ln -s public html
|
&& rm -rf html && ln -s public html
|
||||||
|
|
||||||
VOLUME ["/var/www/storage", "/var/www/public.ext"]
|
VOLUME /var/www/storage /var/www/bootstrap
|
||||||
|
|
||||||
ENV APP_ENV=production \
|
ENV APP_ENV=production \
|
||||||
APP_DEBUG=false \
|
APP_DEBUG=false \
|
||||||
|
|
|
@ -2,19 +2,14 @@
|
||||||
|
|
||||||
# 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/cache/
|
chown -R www-data:www-data storage/ bootstrap/
|
||||||
php artisan storage:link
|
php artisan storage:link
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -13,8 +13,8 @@ version: '3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
app:
|
app:
|
||||||
# Uncomment to build a local copy of the 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:
|
||||||
|
@ -25,20 +25,23 @@ services:
|
||||||
- ./.env
|
- ./.env
|
||||||
volumes:
|
volumes:
|
||||||
- "app-storage:/var/www/storage"
|
- "app-storage:/var/www/storage"
|
||||||
|
- "app-bootstrap:/var/www/bootstrap"
|
||||||
networks:
|
networks:
|
||||||
- external
|
- external
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
# Uncomment if you set HORIZON_EMBED to false and wish to run a local worker
|
worker:
|
||||||
# worker:
|
# Comment to use dockerhub image
|
||||||
# image: pixelfed
|
build: .
|
||||||
# env_file:
|
image: pixelfed
|
||||||
# - ./.env
|
env_file:
|
||||||
# volumes:
|
- ./.env
|
||||||
# - "app-storage:/var/www/storage"
|
volumes:
|
||||||
# networks:
|
- "app-storage:/var/www/storage"
|
||||||
# - internal
|
- "app-bootstrap:/var/www/bootstrap"
|
||||||
# command: gosu www-data php artisan horizon
|
networks:
|
||||||
|
- internal
|
||||||
|
command: gosu www-data php artisan horizon
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
|
@ -53,7 +56,7 @@ services:
|
||||||
- "db-data:/var/lib/mysql"
|
- "db-data:/var/lib/mysql"
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:4-alpine
|
image: redis:5-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- "redis-data:/data"
|
- "redis-data:/data"
|
||||||
networks:
|
networks:
|
||||||
|
@ -64,6 +67,7 @@ volumes:
|
||||||
redis-data:
|
redis-data:
|
||||||
db-data:
|
db-data:
|
||||||
app-storage:
|
app-storage:
|
||||||
|
app-bootstrap:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
internal:
|
internal:
|
||||||
|
|
Loading…
Reference in a new issue