2018-01-29 02:52:20 -05:00
|
|
|
FROM node:8-alpine
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
RUN apk add --no-cache ffmpeg openssl bash make g++ git \
|
|
|
|
&& apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev
|
|
|
|
|
2018-03-23 09:33:51 -04:00
|
|
|
# Add peertube user
|
|
|
|
RUN addgroup -g 991 peertube \
|
|
|
|
&& adduser -D -u 991 -G peertube peertube
|
2018-01-29 02:52:20 -05:00
|
|
|
|
2018-03-23 09:33:51 -04:00
|
|
|
# Download the latest version
|
|
|
|
RUN git clone https://github.com/Chocobozzz/PeerTube /app \
|
|
|
|
&& chown -R peertube:peertube /app
|
2018-01-29 02:52:20 -05:00
|
|
|
|
2018-03-23 09:33:51 -04:00
|
|
|
# Install PeerTube
|
2018-01-29 02:52:20 -05:00
|
|
|
USER peertube
|
2018-03-23 09:33:51 -04:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN yarn install --pure-lockfile \
|
|
|
|
&& npm run build
|
2018-01-29 02:52:20 -05:00
|
|
|
|
2018-03-23 09:33:51 -04:00
|
|
|
# Configure PeerTube
|
2018-03-23 06:22:26 -04:00
|
|
|
RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml
|
2018-01-29 02:52:20 -05:00
|
|
|
ENV NODE_ENV production
|
2018-03-23 09:33:51 -04:00
|
|
|
ENV NODE_CONFIG_DIR /app/support/docker/production/config
|
2018-01-29 02:52:20 -05:00
|
|
|
|
|
|
|
# Run the application
|
|
|
|
CMD ["npm", "start"]
|
|
|
|
VOLUME ["/data"]
|
|
|
|
EXPOSE 9000
|