Federated video streaming platform using ActivityPub and P2P in the web browser with Angular. https://joinpeertube.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.1 KiB

  1. FROM node:10-buster-slim
  2. # Allow to pass extra options to the npm run build
  3. # eg: --light --light-fr to not build all client languages
  4. # (speed up build time if i18n is not required)
  5. ARG NPM_RUN_BUILD_OPTS
  6. # Install dependencies
  7. RUN apt update \
  8. && apt install -y --no-install-recommends openssl ffmpeg python ca-certificates gnupg gosu \
  9. && gosu nobody true \
  10. && rm /var/lib/apt/lists/* -fR
  11. # Add peertube user
  12. RUN groupadd -r peertube \
  13. && useradd -r -g peertube -m peertube
  14. # Install PeerTube
  15. COPY --chown=peertube:peertube . /app
  16. WORKDIR /app
  17. USER peertube
  18. RUN yarn install --pure-lockfile \
  19. && npm run build -- $NPM_RUN_BUILD_OPTS \
  20. && rm -r ./node_modules ./client/node_modules \
  21. && yarn install --pure-lockfile --production \
  22. && yarn cache clean
  23. USER root
  24. RUN mkdir /data /config
  25. RUN chown -R peertube:peertube /data /config
  26. ENV NODE_ENV production
  27. ENV NODE_CONFIG_DIR /config
  28. VOLUME /data
  29. VOLUME /config
  30. COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
  31. ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
  32. # Expose API and RTMP
  33. EXPOSE 9000 1935
  34. # Run the application
  35. CMD ["npm", "start"]