]>
Commit | Line | Data |
---|---|---|
e8395f02 | 1 | FROM node:8-alpine |
2 | ||
3 | # Install dependencies | |
4 | RUN apk add --no-cache ffmpeg openssl bash make g++ git \ | |
5 | && apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev | |
6 | ||
c7574e86 A |
7 | # Add peertube user |
8 | RUN addgroup -g 991 peertube \ | |
9 | && adduser -D -u 991 -G peertube peertube | |
e8395f02 | 10 | |
c7574e86 A |
11 | # Download the latest version |
12 | RUN git clone https://github.com/Chocobozzz/PeerTube /app \ | |
13 | && chown -R peertube:peertube /app | |
e8395f02 | 14 | |
c7574e86 | 15 | # Install PeerTube |
e8395f02 | 16 | USER peertube |
c7574e86 A |
17 | WORKDIR /app |
18 | ||
19 | RUN yarn install --pure-lockfile \ | |
20 | && npm run build | |
e8395f02 | 21 | |
c7574e86 | 22 | # Configure PeerTube |
95540ed2 | 23 | RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml |
e8395f02 | 24 | ENV NODE_ENV production |
c7574e86 | 25 | ENV NODE_CONFIG_DIR /app/support/docker/production/config |
e8395f02 | 26 | |
27 | # Run the application | |
28 | CMD ["npm", "start"] | |
29 | VOLUME ["/data"] | |
30 | EXPOSE 9000 |