X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdocker%2Fproduction%2FDockerfile.stretch;h=b1905b3a8ae84e1df0fb44e3420fe673a70f1530;hb=228e84aa7e604c010ecc39bd54b62fefcca3b94e;hp=c616194e629205898f05afe91bdf993569e8bf74;hpb=95540ed23a2e6ae6d48739f211aa24df57278413;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch index c616194e6..b1905b3a8 100644 --- a/support/docker/production/Dockerfile.stretch +++ b/support/docker/production/Dockerfile.stretch @@ -2,19 +2,25 @@ 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 -RUN git clone -b master https://github.com/Chocobozzz/PeerTube /app +# Add peertube user +RUN groupadd -g 991 peertube \ + && useradd -u 991 -g peertube -m peertube -WORKDIR /app -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