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 06:22:26 -04:00
|
|
|
RUN git clone -b master https://github.com/Chocobozzz/PeerTube /app
|
2018-01-29 02:52:20 -05:00
|
|
|
|
2018-03-23 06:22:26 -04:00
|
|
|
WORKDIR /app
|
2018-01-29 02:52:20 -05:00
|
|
|
RUN bash -c 'yarn install --pure-lockfile && npm run build'
|
|
|
|
|
|
|
|
# Configure the application
|
|
|
|
RUN addgroup -g 991 peertube \
|
|
|
|
&& adduser -D -u 991 -G peertube -h /data peertube
|
|
|
|
USER 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
|
|
|
|
ENV NODE_CONFIG_DIR /app/support/docker/production/config/
|
|
|
|
|
|
|
|
# Run the application
|
|
|
|
CMD ["npm", "start"]
|
|
|
|
VOLUME ["/data"]
|
|
|
|
EXPOSE 9000
|