]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/docker/production/Dockerfile.bullseye
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / support / docker / production / Dockerfile.bullseye
CommitLineData
b0f3c7df 1FROM node:16-bullseye-slim
e8395f02 2
3# Install dependencies
7593d9f8 4RUN apt update \
2c7d736b 5 && apt install -y --no-install-recommends openssl ffmpeg python3 ca-certificates gnupg gosu build-essential curl git \
244e955e
FA
6 && gosu nobody true \
7 && rm /var/lib/apt/lists/* -fR
e8395f02 8
c7574e86 9# Add peertube user
399d20ea
FP
10RUN groupadd -r peertube \
11 && useradd -r -g peertube -m peertube
12
c7574e86 13# Install PeerTube
72698686 14COPY --chown=peertube:peertube . /app
c7574e86 15WORKDIR /app
4aeb67a5
C
16
17USER peertube
c7574e86 18
219e18c9
C
19# Install manually client dependencies to apply our network timeout option
20RUN cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \
21 && yarn install --pure-lockfile --network-timeout 1200000 \
75b7117f 22 && npm run build \
8faa7d87 23 && rm -r ./node_modules ./client/node_modules ./client/.angular \
b18a501a 24 && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
e5095ca5 25 && yarn cache clean
e8395f02 26
fd5e57bb
C
27USER root
28
29RUN mkdir /data /config
30RUN chown -R peertube:peertube /data /config
31
e8395f02 32ENV NODE_ENV production
8d8a037e
JB
33ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
34ENV PEERTUBE_LOCAL_CONFIG /config
e8395f02 35
399d20ea 36VOLUME /data
fd5e57bb 37VOLUME /config
399d20ea 38
1a9b141d 39COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
6348fb18 40ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
399d20ea 41
08d70fe6
RK
42# Expose API and RTMP
43EXPOSE 9000 1935
44
e8395f02 45# Run the application
6348fb18 46CMD [ "node", "dist/server" ]