]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/docker/production/Dockerfile.stretch
Upgrade spectacle module
[github/Chocobozzz/PeerTube.git] / support / docker / production / Dockerfile.stretch
index c739247a64121c8d4f41d7499f2d39e362b5249c..b1905b3a8ae84e1df0fb44e3420fe673a70f1530 100644 (file)
@@ -2,20 +2,26 @@ FROM node:8-stretch
 
 # Install dependencies
 RUN apt-get update \
- && apt-get -y install ffmpeg \
- && rm /var/lib/apt/lists/* -fR
   && apt-get -y install ffmpeg \
   && rm /var/lib/apt/lists/* -fR
 
-# Install the application
-WORKDIR /app
+# Add peertube user
+RUN groupadd -g 991 peertube \
+    && useradd -u 991 -g peertube -m peertube
 
-COPY . ./
-RUN yarn install --pure-lockfile && npm run build
+# Download the latest version
+RUN git clone https://github.com/Chocobozzz/PeerTube /app \
+    && chown -R peertube:peertube /app
 
-# Configure the application
-RUN groupadd -g 991 peertube \
- && useradd -u 991 -g peertube -d /data -m peertube
+# Install PeerTube
 USER peertube
+WORKDIR /app
+
+RUN yarn install --pure-lockfile \
+    && npm run build
 
+# Configure PeerTube
+RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml
 ENV NODE_ENV production
 ENV NODE_CONFIG_DIR /app/support/docker/production/config