From 48fba92a049e872228b45aaa7d283806c7e9aff0 Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Fri, 13 Dec 2024 12:50:59 +0100 Subject: [PATCH] fix: docker --- .github/workflows/docker.yml | 3 +++ Dockerfile | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b2b3662..94c028b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -29,3 +29,6 @@ jobs: ${{ github.ref_name == 'main' && format('ghcr.io/{0}/albert-docs:latest', env.GITHUB_REPOSITORY_OWNER_PART_SLUG) || '' }} cache-from: type=registry,ref=ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}/albert-docs:${{ env.GITHUB_REF_SLUG }} cache-to: type=inline + build-args: + PRODUCTION: true + GITHUB_SHA: ${{ github.sha }} diff --git a/Dockerfile b/Dockerfile index ef12b76..ccc42ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,17 +22,11 @@ ENV NEXT_PUBLIC_BASE_PATH "" WORKDIR /app -RUN yarn postinstall # if you have postinstall script in your package.json RUN if [ -z "$PRODUCTION" ]; then \ echo "Overriding .env for staging"; \ cp .env.staging .env.production; \ fi && \ yarn build -# Production image, copy all the files and run nginx -FROM ghcr.io/socialgouv/docker/nginx:sha-1d70757 AS runner - -COPY --from=builder /app/out /usr/share/nginx/html - # Disable nextjs telemetry ENV NEXT_TELEMETRY_DISABLED 1