2
0

fix(docker): 🐛 Runtime public environment

This commit is contained in:
Baptiste Arnaud
2022-06-22 07:36:11 +02:00
parent 3e47b37c2e
commit f801a29539
55 changed files with 358 additions and 167 deletions

View File

@ -20,7 +20,7 @@ COPY --from=pruner /app/out/full/ .
COPY ./apps/${SCOPE}/.env.docker ./apps/${SCOPE}/.env.production
COPY ./apps/${SCOPE}/.env.docker ./apps/${SCOPE}/.env.local
RUN apt-get -qy update && apt-get -qy install openssl
RUN yarn turbo run build --scope=${SCOPE} --include-dependencies --no-deps
RUN yarn turbo run build:docker --scope=${SCOPE} --include-dependencies --no-deps
RUN find . -name node_modules | xargs rm -rf
FROM base AS runner
@ -36,10 +36,10 @@ COPY --from=builder /app/apps/${SCOPE}/.next/static ./.next/static
COPY --from=builder /app/apps/${SCOPE}/.env.docker ./.env.production
RUN apt-get -qy update && apt-get -qy install openssl
COPY entrypoint.sh ./
COPY env.sh ./
COPY ${SCOPE}-entrypoint.sh ./
RUN chmod +x ./${SCOPE}-entrypoint.sh
RUN chmod +x ./entrypoint.sh
RUN chmod +x ./env.sh
ENTRYPOINT ./${SCOPE}-entrypoint.sh
EXPOSE 3000