mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
Merge pull request #1006 from tcely/patch-15
Some checks are pending
CI / info (push) Waiting to run
CI / test (3.10) (push) Waiting to run
CI / test (3.11) (push) Waiting to run
CI / test (3.12) (push) Waiting to run
CI / test (3.8) (push) Waiting to run
CI / test (3.9) (push) Waiting to run
CI / containerise (push) Blocked by required conditions
Some checks are pending
CI / info (push) Waiting to run
CI / test (3.10) (push) Waiting to run
CI / test (3.11) (push) Waiting to run
CI / test (3.12) (push) Waiting to run
CI / test (3.8) (push) Waiting to run
CI / test (3.9) (push) Waiting to run
CI / containerise (push) Blocked by required conditions
Replace `nginx` with `openresty`
This commit is contained in:
commit
83a505a170
58
Dockerfile
58
Dockerfile
@ -58,6 +58,28 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va
|
|||||||
apt-get -y autoclean && \
|
apt-get -y autoclean && \
|
||||||
rm -f /var/cache/debconf/*.dat-old
|
rm -f /var/cache/debconf/*.dat-old
|
||||||
|
|
||||||
|
FROM alpine:${ALPINE_VERSION} AS openresty-debian
|
||||||
|
ARG TARGETARCH
|
||||||
|
ARG DEBIAN_VERSION
|
||||||
|
ADD 'https://openresty.org/package/pubkey.gpg' '/downloaded/pubkey.gpg'
|
||||||
|
RUN set -eu ; \
|
||||||
|
decide_arch() { \
|
||||||
|
case "${TARGETARCH}" in \
|
||||||
|
(amd64) printf -- '' ;; \
|
||||||
|
(arm64) printf -- 'arm64/' ;; \
|
||||||
|
esac ; \
|
||||||
|
} ; \
|
||||||
|
set -x ; \
|
||||||
|
mkdir -v -p '/etc/apt/trusted.gpg.d' && \
|
||||||
|
apk --no-cache --no-progress add cmd:gpg2 && \
|
||||||
|
gpg2 --dearmor \
|
||||||
|
-o '/etc/apt/trusted.gpg.d/openresty.gpg' \
|
||||||
|
< '/downloaded/pubkey.gpg' && \
|
||||||
|
mkdir -v -p '/etc/apt/sources.list.d' && \
|
||||||
|
printf -- >| '/etc/apt/sources.list.d/openresty.list' \
|
||||||
|
'deb http://openresty.org/package/%sdebian %s openresty' \
|
||||||
|
"$(decide_arch)" "${DEBIAN_VERSION%-slim}"
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION} AS ffmpeg-download
|
FROM alpine:${ALPINE_VERSION} AS ffmpeg-download
|
||||||
ARG FFMPEG_DATE
|
ARG FFMPEG_DATE
|
||||||
ARG FFMPEG_VERSION
|
ARG FFMPEG_VERSION
|
||||||
@ -257,7 +279,38 @@ RUN set -eu ; \
|
|||||||
FROM scratch AS s6-overlay
|
FROM scratch AS s6-overlay
|
||||||
COPY --from=s6-overlay-extracted /s6-overlay-rootfs /
|
COPY --from=s6-overlay-extracted /s6-overlay-rootfs /
|
||||||
|
|
||||||
FROM tubesync-base AS tubesync
|
FROM tubesync-base AS tubesync-openresty
|
||||||
|
|
||||||
|
COPY --from=openresty-debian \
|
||||||
|
/etc/apt/trusted.gpg.d/openresty.gpg /etc/apt/trusted.gpg.d/openresty.gpg
|
||||||
|
COPY --from=openresty-debian \
|
||||||
|
/etc/apt/sources.list.d/openresty.list /etc/apt/sources.list.d/openresty.list
|
||||||
|
|
||||||
|
RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/var/lib/apt \
|
||||||
|
--mount=type=cache,id=apt-cache-cache,sharing=private,target=/var/cache/apt \
|
||||||
|
set -x && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get -y --no-install-recommends install nginx-common openresty && \
|
||||||
|
# Clean up
|
||||||
|
apt-get -y autopurge && \
|
||||||
|
apt-get -y autoclean && \
|
||||||
|
rm -v -f /var/cache/debconf/*.dat-old
|
||||||
|
|
||||||
|
FROM tubesync-base AS tubesync-nginx
|
||||||
|
|
||||||
|
RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/var/lib/apt \
|
||||||
|
--mount=type=cache,id=apt-cache-cache,sharing=private,target=/var/cache/apt \
|
||||||
|
set -x && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get -y --no-install-recommends install nginx-light && \
|
||||||
|
# openresty binary should still work
|
||||||
|
ln -v -s -T ../sbin/nginx /usr/bin/openresty && \
|
||||||
|
# Clean up
|
||||||
|
apt-get -y autopurge && \
|
||||||
|
apt-get -y autoclean && \
|
||||||
|
rm -v -f /var/cache/debconf/*.dat-old
|
||||||
|
|
||||||
|
FROM tubesync-openresty AS tubesync
|
||||||
|
|
||||||
ARG S6_VERSION
|
ARG S6_VERSION
|
||||||
|
|
||||||
@ -282,7 +335,6 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va
|
|||||||
libmariadb3 \
|
libmariadb3 \
|
||||||
libpq5 \
|
libpq5 \
|
||||||
libwebp7 \
|
libwebp7 \
|
||||||
nginx-light \
|
|
||||||
pipenv \
|
pipenv \
|
||||||
pkgconf \
|
pkgconf \
|
||||||
python3 \
|
python3 \
|
||||||
@ -406,7 +458,7 @@ RUN set -x && \
|
|||||||
mkdir -v -p /downloads/audio && \
|
mkdir -v -p /downloads/audio && \
|
||||||
mkdir -v -p /downloads/video && \
|
mkdir -v -p /downloads/video && \
|
||||||
# Check nginx configuration copied from config/root/etc
|
# Check nginx configuration copied from config/root/etc
|
||||||
nginx -t && \
|
openresty -c /etc/nginx/nginx.conf -e stderr -t && \
|
||||||
# Append software versions
|
# Append software versions
|
||||||
ffmpeg_version=$(/usr/local/bin/ffmpeg -version | awk -v 'ev=31' '1 == NR && "ffmpeg" == $1 { print $3; ev=0; } END { exit ev; }') && \
|
ffmpeg_version=$(/usr/local/bin/ffmpeg -version | awk -v 'ev=31' '1 == NR && "ffmpeg" == $1 { print $3; ev=0; } END { exit ev; }') && \
|
||||||
test -n "${ffmpeg_version}" && \
|
test -n "${ffmpeg_version}" && \
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
cd /
|
cd /
|
||||||
|
|
||||||
exec /usr/sbin/nginx
|
exec /usr/bin/openresty -c /etc/nginx/nginx.conf -e stderr
|
||||||
|
Loading…
Reference in New Issue
Block a user