2018-01-29 08:52:20 +01:00
|
|
|
FROM node:8-stretch
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install ffmpeg \
|
|
|
|
&& rm /var/lib/apt/lists/* -fR
|
|
|
|
|
2018-03-23 11:22:26 +01:00
|
|
|
RUN git clone -b master https://github.com/Chocobozzz/PeerTube /app
|
2018-01-29 08:52:20 +01:00
|
|
|
|
2018-03-23 11:22:26 +01:00
|
|
|
WORKDIR /app
|
2018-01-29 08:52:20 +01:00
|
|
|
RUN yarn install --pure-lockfile && npm run build
|
|
|
|
|
|
|
|
# Configure the application
|
|
|
|
RUN groupadd -g 991 peertube \
|
|
|
|
&& useradd -u 991 -g peertube -d /data -m peertube
|
|
|
|
USER peertube
|
|
|
|
|
2018-03-23 11:22:26 +01:00
|
|
|
RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml
|
2018-01-29 08:52:20 +01:00
|
|
|
ENV NODE_ENV production
|
|
|
|
ENV NODE_CONFIG_DIR /app/support/docker/production/config
|
|
|
|
|
|
|
|
# Run the application
|
|
|
|
CMD ["npm", "start"]
|
|
|
|
VOLUME ["/data"]
|
|
|
|
EXPOSE 9000
|