]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - support/docker/production/Dockerfile.bullseye
Update translations
[github/Chocobozzz/PeerTube.git] / support / docker / production / Dockerfile.bullseye
... / ...
CommitLineData
1FROM node:16-bullseye-slim
2
3# Install dependencies
4RUN apt update \
5 && apt install -y --no-install-recommends openssl ffmpeg python3 ca-certificates gnupg gosu build-essential curl git \
6 && gosu nobody true \
7 && rm /var/lib/apt/lists/* -fR
8
9# Add peertube user
10RUN groupadd -r peertube \
11 && useradd -r -g peertube -m peertube
12
13# Install PeerTube
14COPY --chown=peertube:peertube . /app
15WORKDIR /app
16
17USER peertube
18
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 \
22 && npm run build \
23 && rm -r ./node_modules ./client/node_modules ./client/.angular \
24 && yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
25 && yarn cache clean
26
27USER root
28
29RUN mkdir /data /config
30RUN chown -R peertube:peertube /data /config
31
32ENV NODE_ENV production
33ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
34ENV PEERTUBE_LOCAL_CONFIG /config
35
36VOLUME /data
37VOLUME /config
38
39COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
40ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
41
42# Expose API and RTMP
43EXPOSE 9000 1935
44
45# Run the application
46CMD [ "node", "dist/server" ]