|
@@ -1,13 +1,22 @@
|
|
FROM node:18.20.4-alpine3.20 as mercury-parser-api-build
|
|
FROM node:18.20.4-alpine3.20 as mercury-parser-api-build
|
|
|
|
+
|
|
|
|
+RUN apk add --no-cache git python3 build-base \
|
|
# install mercury-parser-api
|
|
# install mercury-parser-api
|
|
-RUN apk add --no-cache git \
|
|
|
|
-&& npm install --prefix /usr/local/mercury-parser-api git+https://github.com/HenryQW/mercury-parser-api.git
|
|
|
|
|
|
+&& npm install --prefix /usr/local/mercury-parser-api git+https://github.com/HenryQW/mercury-parser-api.git \
|
|
|
|
+&& sed -i 's/env.PORT/env.MERCURY_PORT/' /usr/local/mercury-parser-api/node_modules/mercury-parser-api/config.js \
|
|
|
|
+# install OpenCC.henry.wang
|
|
|
|
+&& npm install --prefix /usr/local/OpenCC.henry.wang git+https://github.com/BYVoid/OpenCC.git \
|
|
|
|
+&& npm install --prefix /usr/local/OpenCC.henry.wang express \
|
|
|
|
+&& npm install --prefix /usr/local/OpenCC.henry.wang git+https://github.com/HenryQW/OpenCC.henry.wang.git \
|
|
|
|
+&& sed -i 's/env.PORT/env.OPENCC_PORT/' /usr/local/OpenCC.henry.wang/node_modules/opencc.henry.wang/bin/www \
|
|
|
|
+&& sed -i 's/3000/4000/' /usr/local/OpenCC.henry.wang/node_modules/opencc.henry.wang/bin/www
|
|
|
|
+
|
|
|
|
|
|
FROM ghcr.io/gshang2017/postgres:latest
|
|
FROM ghcr.io/gshang2017/postgres:latest
|
|
|
|
|
|
ARG S6_VER=3.2.0.2
|
|
ARG S6_VER=3.2.0.2
|
|
-ARG TTRSS_VER=24.11-4dfa7a66
|
|
|
|
-ARG GIT_COMMIT_SHA=4dfa7a666acd8c33ddce769b82dd121849208f1d
|
|
|
|
|
|
+ARG TTRSS_VER=24.12-7b727156
|
|
|
|
+ARG GIT_COMMIT_SHA=7b727156780236cb639c52e45d07cc80c1f2b0d3
|
|
|
|
|
|
ENV UID=1000
|
|
ENV UID=1000
|
|
ENV GID=1000
|
|
ENV GID=1000
|
|
@@ -28,18 +37,26 @@ ENV TZ=Asia/Shanghai
|
|
ENV TTRSS_ALLOW_PORTS=80,443
|
|
ENV TTRSS_ALLOW_PORTS=80,443
|
|
ENV TTRSS_UPDATE_AUTO=true
|
|
ENV TTRSS_UPDATE_AUTO=true
|
|
ENV TTRSS_CADDY_PORT=80
|
|
ENV TTRSS_CADDY_PORT=80
|
|
|
|
+ENV ENABLE_MERCURY=true
|
|
|
|
+ENV MERCURY_PORT=3000
|
|
|
|
+ENV ENABLE_OPENCC=false
|
|
|
|
+ENV OPENCC_PORT=4000
|
|
|
|
+ENV PGPORT=5432
|
|
|
|
+ENV PHP_LISTEN_PORT=9000
|
|
ENV POSTGRES_DB_DUMP=false
|
|
ENV POSTGRES_DB_DUMP=false
|
|
ENV POSTGRES_DB_RESTORE=false
|
|
ENV POSTGRES_DB_RESTORE=false
|
|
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
|
|
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
|
|
|
|
|
|
COPY --chmod=755 root /
|
|
COPY --chmod=755 root /
|
|
COPY --from=mercury-parser-api-build --chmod=755 /usr/local/mercury-parser-api /usr/local/mercury-parser-api
|
|
COPY --from=mercury-parser-api-build --chmod=755 /usr/local/mercury-parser-api /usr/local/mercury-parser-api
|
|
|
|
+COPY --from=mercury-parser-api-build --chmod=755 /usr/local/OpenCC.henry.wang /usr/local/OpenCC.henry.wang
|
|
|
|
+COPY --from=mercury-parser-api-build --chmod=755 /usr/local/bin/node /usr/local/bin/node
|
|
|
|
|
|
# install php tt-rss caddy git [npm nodejs]-mercury-parser-api
|
|
# 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 dumb-init postgresql-client musl-locales \
|
|
|
|
|
|
+RUN apk add --no-cache bash shadow tzdata git ca-certificates caddy dumb-init postgresql-client musl-locales \
|
|
php83 php83-fpm php83-phar php83-sockets php83-pecl-apcu php83-pdo php83-gd php83-pgsql php83-pdo_pgsql php83-xmlwriter php83-opcache \
|
|
php83 php83-fpm php83-phar php83-sockets php83-pecl-apcu php83-pdo php83-gd php83-pgsql php83-pdo_pgsql php83-xmlwriter php83-opcache \
|
|
php83-mbstring php83-intl php83-xml php83-curl php83-simplexml php83-session php83-tokenizer php83-dom php83-fileinfo php83-ctype \
|
|
php83-mbstring php83-intl php83-xml php83-curl php83-simplexml php83-session php83-tokenizer php83-dom php83-fileinfo php83-ctype \
|
|
- php83-json php83-iconv php83-pcntl php83-posix php83-zip php83-exif php83-openssl php83-pecl-xdebug \
|
|
|
|
|
|
+ php83-json php83-iconv php83-pcntl php83-posix php83-zip php83-exif php83-openssl php83-pecl-xdebug python3 \
|
|
&& apk add --no-cache --virtual ttrssdep clang15 llvm15 build-base \
|
|
&& apk add --no-cache --virtual ttrssdep clang15 llvm15 build-base \
|
|
# install s6-overlay
|
|
# install s6-overlay
|
|
&& 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 \
|
|
&& 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 \
|
|
@@ -51,8 +68,6 @@ RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy d
|
|
&& tar -C / -Jxpf /tmp/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 \
|
|
&& 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 \
|
|
&& 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
|
|
# install zhparser
|
|
&& wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2 \
|
|
&& wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2 \
|
|
&& tar -xf scws-1.2.3.tar.bz2 \
|
|
&& tar -xf scws-1.2.3.tar.bz2 \
|
|
@@ -91,6 +106,8 @@ RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy d
|
|
&& git clone --depth 1 https://github.com/DigitalDJ/tinytinyrss-fever-plugin /usr/local/tt-rss/defaults/plugins.local/fever \
|
|
&& git clone --depth 1 https://github.com/DigitalDJ/tinytinyrss-fever-plugin /usr/local/tt-rss/defaults/plugins.local/fever \
|
|
# install af-readability
|
|
# install af-readability
|
|
&& git clone --depth 1 https://git.tt-rss.org/fox/ttrss-af-readability.git /usr/local/tt-rss/defaults/plugins.local/af_readability \
|
|
&& git clone --depth 1 https://git.tt-rss.org/fox/ttrss-af-readability.git /usr/local/tt-rss/defaults/plugins.local/af_readability \
|
|
|
|
+# install opencc
|
|
|
|
+&& git clone --depth 1 https://github.com/HenryQW/ttrss_opencc.git /usr/local/tt-rss/defaults/plugins.local/opencc \
|
|
# install themes
|
|
# install themes
|
|
# install tt-rss-feedly-theme
|
|
# install tt-rss-feedly-theme
|
|
&& git clone -b dist --depth 1 https://github.com/levito/tt-rss-feedly-theme.git /usr/local/tt-rss/defaults/themes.local/tt-rss-feedly-theme \
|
|
&& git clone -b dist --depth 1 https://github.com/levito/tt-rss-feedly-theme.git /usr/local/tt-rss/defaults/themes.local/tt-rss-feedly-theme \
|
|
@@ -99,11 +116,12 @@ RUN apk add --no-cache bash shadow tzdata git npm nodejs ca-certificates caddy d
|
|
&& git config --global --add safe.directory /config/plugins.local/mercury_fulltext \
|
|
&& git config --global --add safe.directory /config/plugins.local/mercury_fulltext \
|
|
&& git config --global --add safe.directory /config/plugins.local/feediron \
|
|
&& git config --global --add safe.directory /config/plugins.local/feediron \
|
|
&& git config --global --add safe.directory /config/plugins.local/fever \
|
|
&& git config --global --add safe.directory /config/plugins.local/fever \
|
|
|
|
+&& git config --global --add safe.directory /config/plugins.local/opencc \
|
|
&& git config --global --add safe.directory /usr/local/tt-rss/defaults/themes.local/tt-rss-feedly-theme \
|
|
&& git config --global --add safe.directory /usr/local/tt-rss/defaults/themes.local/tt-rss-feedly-theme \
|
|
#clear
|
|
#clear
|
|
&& apk del ttrssdep \
|
|
&& apk del ttrssdep \
|
|
&& rm -rf /var/cache/apk/* /tmp/* /scws*
|
|
&& rm -rf /var/cache/apk/* /tmp/* /scws*
|
|
|
|
|
|
VOLUME /config
|
|
VOLUME /config
|
|
-EXPOSE 80 3000 5432
|
|
|
|
|
|
+EXPOSE 80 3000 4000 5432
|
|
ENTRYPOINT [ "/init" ]
|
|
ENTRYPOINT [ "/init" ]
|