2022-11-11 14:16:15 +01:00
|
|
|
FROM reg.zknt.org/zknt/debian-php:8.1 as builder
|
2020-05-28 18:18:10 +02:00
|
|
|
|
2020-08-14 08:39:01 +02:00
|
|
|
ARG DATE
|
|
|
|
|
2022-11-11 14:16:15 +01:00
|
|
|
ENV PHPVER=8.1
|
2023-08-01 09:48:41 +02:00
|
|
|
ENV IP_PATCH=14cca91255bca69dec195112ce2fbd110e2406ca
|
|
|
|
ENV DISCOVERY_PATCH=f4a01bc97efeb259fd0c6e2016949c90675cc555
|
|
|
|
ENV GITHUB_PATCH=06bcf80133f6c212f1674d280974c669b4524283
|
|
|
|
ENV BEAGLE_PATCH=f45a489d5e45de21d648437880ef525a2e957b7b
|
|
|
|
ENV USERNAME_PATCH=737319bff8697263df19b9b4c0a2ee7cc8055476
|
2021-03-02 16:57:51 +01:00
|
|
|
|
2020-05-28 18:18:10 +02:00
|
|
|
RUN set -xe;\
|
2023-04-20 13:58:57 +02: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 12:13:04 +01:00
|
|
|
RUN set -xe;\
|
2020-05-28 18:18:10 +02:00
|
|
|
cd /var && rm -rf www &&\
|
|
|
|
git clone https://github.com/pixelfed/pixelfed.git www &&\
|
|
|
|
cd www &&\
|
2022-02-08 20:37:53 +01:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${IP_PATCH}.patch | git apply &&\
|
2022-09-11 14:10:21 +02:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${DISCOVERY_PATCH}.patch | git apply &&\
|
2023-04-10 18:36:34 +02:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${GITHUB_PATCH}.patch | git apply &&\
|
2023-07-17 10:50:20 +02:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${BEAGLE_PATCH}.patch | git apply &&\
|
2023-08-01 09:48:41 +02:00
|
|
|
curl -L https://github.com/hnrd/pixelfed/commit/${USERNAME_PATCH}.patch | git apply &&\
|
2020-06-18 15:41:38 +02:00
|
|
|
composer install --prefer-dist --no-interaction --no-ansi --no-dev --optimize-autoloader &&\
|
2020-05-28 18:18:10 +02: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 23:36:41 +01:00
|
|
|
FROM reg.zknt.org/zknt/debian-php:8.1
|
|
|
|
ENV PHPVER=8.1
|
2020-05-28 18:18:10 +02:00
|
|
|
COPY --from=builder /var/www /var/www
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
2020-05-30 12:52:02 +02:00
|
|
|
COPY worker-entrypoint.sh /worker-entrypoint.sh
|
2022-07-08 14:10:30 +02:00
|
|
|
COPY websockets-entrypoint.sh /websockets-entrypoint.sh
|
2020-05-30 12:46:57 +02:00
|
|
|
COPY wait-for-db.php /wait-for-db.php
|
2021-10-29 21:00:54 +02: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 13:12:26 +02:00
|
|
|
a2enmod rewrite &&\
|
2020-06-27 03:01:49 +02:00
|
|
|
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf &&\
|
2021-03-02 16:57:51 +01: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 13:12:26 +02:00
|
|
|
WORKDIR /var/www
|
2020-05-28 18:18:10 +02:00
|
|
|
VOLUME /var/www/storage /var/www/bootstrap
|
|
|
|
ENTRYPOINT /entrypoint.sh
|
2020-08-14 08:39:01 +02:00
|
|
|
|
|
|
|
LABEL build.date=$DATE
|