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