|
|
@@ -1,7 +1,7 @@
|
|
|
-FROM cthulhoo/ttrss-fpm-pgsql-static:22.07-26c67dba7 as ttrss-src
|
|
|
+FROM cthulhoo/ttrss-fpm-pgsql-static:22.08-5fea1a7ea as ttrss-src
|
|
|
FROM postgres:14.1-alpine
|
|
|
|
|
|
-ARG S6_VER=2.2.0.3
|
|
|
+ARG S6_VER=3.1.2.1
|
|
|
|
|
|
ENV UID=1000
|
|
|
ENV GID=1000
|
|
|
@@ -15,7 +15,7 @@ ENV TTRSS_DB_TYPE=pgsql
|
|
|
ENV TTRSS_DB_PORT=5432
|
|
|
ENV TTRSS_DB_HOST=0.0.0.0
|
|
|
ENV TTRSS_SELF_URL_PATH=http://localhost:80/
|
|
|
-ENV TTRSS_PHP_EXECUTABLE=/usr/bin/php8
|
|
|
+ENV TTRSS_PHP_EXECUTABLE=/usr/bin/php81
|
|
|
ENV TTRSS_PLUGINS=auth_internal,fever,mercury_fulltext
|
|
|
ENV SCRIPT_ROOT=/usr/local/tt-rss/app
|
|
|
ENV TZ=Asia/Shanghai
|
|
|
@@ -23,20 +23,25 @@ ENV TTRSS_ALLOW_PORTS=80,443
|
|
|
ENV TTRSS_UPDATE_AUTO=true
|
|
|
ENV POSTGRES_DB_DUMP=false
|
|
|
ENV POSTGRES_DB_RESTORE=false
|
|
|
+ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
|
|
|
|
|
|
-COPY root /
|
|
|
-COPY --from=ttrss-src /src/tt-rss /usr/local/tt-rss/app
|
|
|
+COPY --chmod=755 root /
|
|
|
+COPY --from=ttrss-src --chmod=755 /src/tt-rss /usr/local/tt-rss/app
|
|
|
|
|
|
# install php tt-rss caddy git [npm nodejs]-mercury-parser-api
|
|
|
-RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy clang llvm13 build-base dumb-init postgresql-client \
|
|
|
- php8 php8-fpm php8-pdo php8-gd php8-pgsql php8-pdo_pgsql php8-mbstring php8-intl php8-xml php8-curl php8-session \
|
|
|
- php8-tokenizer php8-dom php8-fileinfo php8-json php8-iconv php8-pcntl php8-posix php8-zip php8-exif php8-openssl php8-pecl-xdebug \
|
|
|
-#gd-png: libpng warning
|
|
|
-&& apk add --no-cache php8-gd=8.0.13-r0 --repository https://dl-cdn.alpinelinux.org/alpine/v3.14/community \
|
|
|
+RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy clang llvm13 build-base dumb-init postgresql-client musl-locales \
|
|
|
+ php81 php81-fpm php81-pdo php81-gd php81-pgsql php81-pdo_pgsql php81-mbstring php81-intl php81-xml php81-curl php81-session php81-tokenizer \
|
|
|
+ php81-dom php81-fileinfo php81-ctype php81-json php81-iconv php81-pcntl php81-posix php81-zip php81-exif php81-openssl php81-pecl-xdebug \
|
|
|
# install s6-overlay
|
|
|
-&& if [ "$(uname -m)" = "x86_64" ];then s6_arch=amd64;elif [ "$(uname -m)" = "aarch64" ];then s6_arch=aarch64;elif [ "$(uname -m)" = "armv7l" ];then s6_arch=arm; fi \
|
|
|
-&& wget --no-check-certificate https://github.com/just-containers/s6-overlay/releases/download/v${S6_VER}/s6-overlay-${s6_arch}.tar.gz \
|
|
|
-&& tar -xvzf s6-overlay-${s6_arch}.tar.gz \
|
|
|
+&& if [ "$(uname -m)" = "x86_64" ];then s6_arch=x86_64;elif [ "$(uname -m)" = "aarch64" ];then s6_arch=aarch64;elif [ "$(uname -m)" = "armv7l" ];then s6_arch=arm; fi \
|
|
|
+&& wget -P /tmp https://github.com/just-containers/s6-overlay/releases/download/v${S6_VER}/s6-overlay-noarch.tar.xz \
|
|
|
+&& tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz \
|
|
|
+&& wget -P /tmp https://github.com/just-containers/s6-overlay/releases/download/v${S6_VER}/s6-overlay-${s6_arch}.tar.xz \
|
|
|
+&& tar -C / -Jxpf /tmp/s6-overlay-${s6_arch}.tar.xz \
|
|
|
+&& wget -P /tmp https://github.com/just-containers/s6-overlay/releases/download/v${S6_VER}/s6-overlay-symlinks-noarch.tar.xz \
|
|
|
+&& tar -C / -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz \
|
|
|
+&& wget -P /tmp https://github.com/just-containers/s6-overlay/releases/download/v${S6_VER}/s6-overlay-symlinks-arch.tar.xz \
|
|
|
+&& tar -C / -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz \
|
|
|
# install mercury-parser-api
|
|
|
&& npm install --prefix /usr/local/mercury-parser-api git+https://github.com/HenryQW/mercury-parser-api.git \
|
|
|
# install zhparser
|
|
|
@@ -52,11 +57,14 @@ RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy c
|
|
|
&& useradd -u 1000 -U -d /config -s /bin/false ttrss \
|
|
|
&& usermod -G users ttrss \
|
|
|
# php
|
|
|
-&& sed -i 's/\(memory_limit =\) 128M/\1 256M/' /etc/php8/php.ini \
|
|
|
-&& sed -i -e 's/;\(clear_env\) = .*/\1 = no/i' /etc/php8/php-fpm.d/www.conf \
|
|
|
-&& sed -i -e 's/^\(user\|group\) = .*/\1 = postgres/i' /etc/php8/php-fpm.d/www.conf \
|
|
|
-&& sed -i -e 's/;\(php_admin_value\[error_log\]\) = .*/\1 = \/var\/log\/php8\/error.log/' /etc/php8/php-fpm.d/www.conf \
|
|
|
-&& sed -i -e 's/;\(php_admin_flag\[log_errors\]\) = .*/\1 = on/' /etc/php8/php-fpm.d/www.conf \
|
|
|
+&& sed -i 's/\(memory_limit =\) 128M/\1 256M/' /etc/php81/php.ini \
|
|
|
+&& sed -i -e 's/;\(clear_env\) = .*/\1 = no/i' /etc/php81/php-fpm.d/www.conf \
|
|
|
+&& sed -i -e 's/^\(user\|group\) = .*/\1 = postgres/i' /etc/php81/php-fpm.d/www.conf \
|
|
|
+&& sed -i -e 's/;\(php_admin_value\[error_log\]\) = .*/\1 = \/var\/log\/php81\/error.log/' /etc/php81/php-fpm.d/www.conf \
|
|
|
+&& sed -i -e 's/;\(php_admin_flag\[log_errors\]\) = .*/\1 = on/' /etc/php81/php-fpm.d/www.conf \
|
|
|
+# reset ttrss
|
|
|
+&& cd /usr/local/tt-rss/app \
|
|
|
+&& git reset --hard HEAD \
|
|
|
# install plugins
|
|
|
&& mkdir -p /usr/local/tt-rss/defaults \
|
|
|
&& mv /usr/local/tt-rss/app/cache /usr/local/tt-rss/defaults/cache \
|
|
|
@@ -84,12 +92,7 @@ RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy c
|
|
|
&& git config --global --add safe.directory /usr/local/tt-rss/defaults/themes.local/tt-rss-feedly-theme \
|
|
|
#clear
|
|
|
&& apk del clang llvm13 build-base \
|
|
|
-&& rm -rf /var/cache/apk/* \
|
|
|
-&& rm /s6-overlay-${s6_arch}.tar.gz \
|
|
|
-&& rm -rf /scws* \
|
|
|
-&& chmod a+x /usr/local/bin/initialize.sh \
|
|
|
-&& chmod a+x /usr/local/tt-rss/defaults/updatett-rss.sh \
|
|
|
-&& chmod a+x /usr/local/tt-rss/defaults/postgres-dump-restore.sh
|
|
|
+&& rm -rf /var/cache/apk/* /tmp/* /scws*
|
|
|
|
|
|
VOLUME /config
|
|
|
EXPOSE 80 3000 5432
|