2022-11-11 13:16:15 +00:00
|
|
|
FROM reg.zknt.org/zknt/debian-php:8.1 as builder
|
2020-05-28 16:18:10 +00:00
|
|
|
|
2020-08-14 06:39:01 +00:00
|
|
|
ARG DATE
|
|
|
|
|
2022-11-11 13:16:15 +00:00
|
|
|
ENV PHPVER=8.1
|
2023-05-27 09:35:13 +00:00
|
|
|
ENV IP_PATCH=a665f449bfad129b0e20d3f2b386e30332452b40
|
2023-04-10 16:36:34 +00:00
|
|
|
ENV DISCOVERY_PATCH=4c82fa3e0a2d0a94417cd6b1637893c92f1b1bd5
|
|
|
|
ENV GITHUB_PATCH=920b06f6f16c22b32c8e2a14772fc053fbb973bb
|
2021-03-02 15:57:51 +00:00
|
|
|
|
2020-05-28 16:18:10 +00:00
|
|
|
RUN set -xe;\
|
2023-04-20 11:58:57 +00:00
|
|
|
apt-install git unzip php${PHPVER}-curl php${PHPVER}-zip php${PHPVER}-bcmath php${PHPVER}-intl php${PHPVER}-mbstring php${PHPVER}-xml
|
|
|
|
RUN set -xe;\
|
|
|
|
curl https://raw.githubusercontent.com/composer/getcomposer.org/0a51b6fe383f7f61cf1d250c742ec655aa044c94/web/installer | php -- --quiet --2.2 &&\
|
|
|
|
mv composer.phar /usr/local/bin/composer
|
2022-11-14 11:13:04 +00:00
|
|
|
RUN set -xe;\
|
2020-05-28 16:18:10 +00:00
|
|
|
cd /var && rm -rf www &&\
|
|
|
|
git clone https://github.com/pixelfed/pixelfed.git www &&\
|
|
|
|
cd www &&\
|
2022-02-08 19:37:53 +00:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${IP_PATCH}.patch | git apply &&\
|
2022-09-11 12:10:21 +00:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${DISCOVERY_PATCH}.patch | git apply &&\
|
2023-04-10 16:36:34 +00:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${GITHUB_PATCH}.patch | git apply &&\
|
2020-06-18 13:41:38 +00:00
|
|
|
composer install --prefer-dist --no-interaction --no-ansi --no-dev --optimize-autoloader &&\
|
2020-05-28 16:18:10 +00:00
|
|
|
ln -s public html &&\
|
|
|
|
chown -R www-data:www-data /var/www &&\
|
|
|
|
cp -r storage storage.skel &&\
|
|
|
|
rm -rf .git tests contrib CHANGELOG.md LICENSE .circleci .dependabot .github CODE_OF_CONDUCT.md .env.docker CONTRIBUTING.md README.md docker-compose.yml .env.testing phpunit.xml .env.example .gitignore .editorconfig .gitattributes .dockerignore
|
|
|
|
|
2022-11-12 22:36:41 +00:00
|
|
|
FROM reg.zknt.org/zknt/debian-php:8.1
|
|
|
|
ENV PHPVER=8.1
|
2020-05-28 16:18:10 +00:00
|
|
|
COPY --from=builder /var/www /var/www
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
2020-05-30 10:52:02 +00:00
|
|
|
COPY worker-entrypoint.sh /worker-entrypoint.sh
|
2022-07-08 12:10:30 +00:00
|
|
|
COPY websockets-entrypoint.sh /websockets-entrypoint.sh
|
2020-05-30 10:46:57 +00:00
|
|
|
COPY wait-for-db.php /wait-for-db.php
|
2021-10-29 19:00:54 +00:00
|
|
|
RUN apt-install php${PHPVER}-curl php${PHPVER}-zip php${PHPVER}-bcmath php${PHPVER}-intl php${PHPVER}-mbstring php${PHPVER}-xml optipng pngquant jpegoptim gifsicle ffmpeg php${PHPVER}-imagick php${PHPVER}-gd php${PHPVER}-redis php${PHPVER}-mysql php${PHPVER}-pgsql &&\
|
2020-05-29 11:12:26 +00:00
|
|
|
a2enmod rewrite &&\
|
2020-06-27 01:01:49 +00:00
|
|
|
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf &&\
|
2021-03-02 15:57:51 +00:00
|
|
|
sed -i 's/^post_max_size.*/post_max_size = 100M/g' /etc/php/${PHPVER}/apache2/php.ini &&\
|
|
|
|
sed -i 's/^upload_max_filesize.*/upload_max_filesize = 100M/g' /etc/php/${PHPVER}/apache2/php.ini
|
2020-05-29 11:12:26 +00:00
|
|
|
WORKDIR /var/www
|
2020-05-28 16:18:10 +00:00
|
|
|
VOLUME /var/www/storage /var/www/bootstrap
|
|
|
|
ENTRYPOINT /entrypoint.sh
|
2020-08-14 06:39:01 +00:00
|
|
|
|
|
|
|
LABEL build.date=$DATE
|