X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=Dockerfile;h=19d01f810aab9ac58277190be5ead17ea4ed9f0e;hb=b1ccd8d6b2ce6ed60b784b9f3ba09004ca27fc07;hp=29fda0ed766649d85897a9867b77b7f7e8bc01df;hpb=d10b219db596bb215db502b42e19443b8924fd56;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/Dockerfile b/Dockerfile index 29fda0e..19d01f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM node:lts-alpine as build-stage WORKDIR /app COPY package*.json ./ -RUN yarn install +RUN yarn install --frozen-lockfile COPY . . RUN yarn build @@ -16,12 +16,15 @@ ENV USER darkhttpd ENV GROUP darkhttpd ENV GID 911 ENV UID 911 +ENV PORT 8080 RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ - apk add -U darkhttpd - -USER ${USER} + apk add -U --no-cache su-exec darkhttpd COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ +COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets +COPY entrypoint.sh /entrypoint.sh -ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] \ No newline at end of file +EXPOSE ${PORT} +VOLUME /www/assets +ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]