]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/docker/production/Dockerfile.stretch
(docker) search and import settings env variables (#1210)
[github/Chocobozzz/PeerTube.git] / support / docker / production / Dockerfile.stretch
index a8c3d62cefbcbbeff5ad12f7d139014c3fea22d9..911d064f6c26c04ae6d07a1439fadf9270ad255b 100644 (file)
@@ -55,16 +55,21 @@ RUN chown -R peertube:peertube /app
 USER peertube
 
 RUN yarn install --pure-lockfile \
-    && npm run build
+    && npm run build \
+    && rm -r ./node_modules ./client/node_modules \
+    && yarn install --pure-lockfile --production \
+    && yarn cache clean
+
+USER root
+
+RUN mkdir /data /config
+RUN chown -R peertube:peertube /data /config
 
-# 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
+ENV NODE_CONFIG_DIR /config
 
-USER root
-RUN mkdir /data && chown peertube:peertube /data
 VOLUME /data
+VOLUME /config
 
 COPY ./support/docker/production/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]