From f7882ca3eb3ac17610fdf70c7acec48fd53bbf12 Mon Sep 17 00:00:00 2001 From: Yehuda Deutsch Date: Fri, 28 Jul 2023 13:10:26 -0400 Subject: Switch from debian bullseye to bookworm --- support/doc/docker.md | 2 +- support/docker/production/Dockerfile.bookworm | 46 +++++++++++++++++++++++++++ support/docker/production/Dockerfile.bullseye | 46 --------------------------- support/docker/production/docker-compose.yml | 4 +-- 4 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 support/docker/production/Dockerfile.bookworm delete mode 100644 support/docker/production/Dockerfile.bullseye (limited to 'support') diff --git a/support/doc/docker.md b/support/doc/docker.md index 066451067..46eb9e56e 100644 --- a/support/doc/docker.md +++ b/support/doc/docker.md @@ -165,7 +165,7 @@ docker compose up -d ```shell git clone https://github.com/chocobozzz/PeerTube /tmp/peertube cd /tmp/peertube -docker build . -f ./support/docker/production/Dockerfile.bullseye +docker build . -f ./support/docker/production/Dockerfile.bookworm ``` ### Development diff --git a/support/docker/production/Dockerfile.bookworm b/support/docker/production/Dockerfile.bookworm new file mode 100644 index 000000000..bcdef7a7f --- /dev/null +++ b/support/docker/production/Dockerfile.bookworm @@ -0,0 +1,46 @@ +FROM node:16-bookworm-slim + +# Install dependencies +RUN apt update \ + && apt install -y --no-install-recommends openssl ffmpeg python3 ca-certificates gnupg gosu build-essential curl git \ + && gosu nobody true \ + && rm /var/lib/apt/lists/* -fR + +# Add peertube user +RUN groupadd -r peertube \ + && useradd -r -g peertube -m peertube + +# Install PeerTube +COPY --chown=peertube:peertube . /app +WORKDIR /app + +USER peertube + +# Install manually client dependencies to apply our network timeout option +RUN cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \ + && yarn install --pure-lockfile --network-timeout 1200000 \ + && npm run build \ + && rm -r ./node_modules ./client/node_modules ./client/.angular \ + && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \ + && yarn cache clean + +USER root + +RUN mkdir /data /config +RUN chown -R peertube:peertube /data /config + +ENV NODE_ENV production +ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config +ENV PEERTUBE_LOCAL_CONFIG /config + +VOLUME /data +VOLUME /config + +COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] + +# Expose API and RTMP +EXPOSE 9000 1935 + +# Run the application +CMD [ "node", "dist/server" ] diff --git a/support/docker/production/Dockerfile.bullseye b/support/docker/production/Dockerfile.bullseye deleted file mode 100644 index 267d7f4eb..000000000 --- a/support/docker/production/Dockerfile.bullseye +++ /dev/null @@ -1,46 +0,0 @@ -FROM node:16-bullseye-slim - -# Install dependencies -RUN apt update \ - && apt install -y --no-install-recommends openssl ffmpeg python3 ca-certificates gnupg gosu build-essential curl git \ - && gosu nobody true \ - && rm /var/lib/apt/lists/* -fR - -# Add peertube user -RUN groupadd -r peertube \ - && useradd -r -g peertube -m peertube - -# Install PeerTube -COPY --chown=peertube:peertube . /app -WORKDIR /app - -USER peertube - -# Install manually client dependencies to apply our network timeout option -RUN cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \ - && yarn install --pure-lockfile --network-timeout 1200000 \ - && npm run build \ - && rm -r ./node_modules ./client/node_modules ./client/.angular \ - && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \ - && yarn cache clean - -USER root - -RUN mkdir /data /config -RUN chown -R peertube:peertube /data /config - -ENV NODE_ENV production -ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config -ENV PEERTUBE_LOCAL_CONFIG /config - -VOLUME /data -VOLUME /config - -COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh -ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] - -# Expose API and RTMP -EXPOSE 9000 1935 - -# Run the application -CMD [ "node", "dist/server" ] diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml index 13f75f222..1993c3979 100644 --- a/support/docker/production/docker-compose.yml +++ b/support/docker/production/docker-compose.yml @@ -44,8 +44,8 @@ services: # If you don't want to use the official image and build one from sources: # build: # context: . - # dockerfile: ./support/docker/production/Dockerfile.bullseye - image: chocobozzz/peertube:production-bullseye + # dockerfile: ./support/docker/production/Dockerfile.bookworm + image: chocobozzz/peertube:production-bookworm # Use a static IP for this container because nginx does not handle proxy host change without reload # This container could be restarted on crash or until the postgresql database is ready for connection networks: -- cgit v1.2.3