]>
Commit | Line | Data |
---|---|---|
e8395f02 | 1 | FROM node:8-stretch |
2 | ||
3 | # Install dependencies | |
4 | RUN apt-get update \ | |
c7574e86 A |
5 | && apt-get -y install ffmpeg \ |
6 | && rm /var/lib/apt/lists/* -fR | |
e8395f02 | 7 | |
c7574e86 A |
8 | # Add peertube user |
9 | RUN groupadd -g 991 peertube \ | |
10 | && useradd -u 991 -g peertube -m peertube | |
e8395f02 | 11 | |
c7574e86 A |
12 | # Download the latest version |
13 | RUN git clone https://github.com/Chocobozzz/PeerTube /app \ | |
14 | && chown -R peertube:peertube /app | |
e8395f02 | 15 | |
c7574e86 | 16 | # Install PeerTube |
e8395f02 | 17 | USER peertube |
c7574e86 A |
18 | WORKDIR /app |
19 | ||
20 | RUN yarn install --pure-lockfile \ | |
21 | && npm run build | |
e8395f02 | 22 | |
c7574e86 | 23 | # Configure PeerTube |
95540ed2 | 24 | RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml |
e8395f02 | 25 | ENV NODE_ENV production |
26 | ENV NODE_CONFIG_DIR /app/support/docker/production/config | |
27 | ||
28 | # Run the application | |
29 | CMD ["npm", "start"] | |
30 | VOLUME ["/data"] | |
31 | EXPOSE 9000 |