From 18ac1b46ae261520bfd1938def471833aac792ec Mon Sep 17 00:00:00 2001 From: ChrQR Date: Sat, 18 May 2024 00:30:21 +0200 Subject: [PATCH] Minor tweaks to dockerfile and workflow --- .gitea/workflows/pipeline.yaml | 3 +-- Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml index c1b735b..a218b6e 100644 --- a/.gitea/workflows/pipeline.yaml +++ b/.gitea/workflows/pipeline.yaml @@ -34,5 +34,4 @@ jobs: context: . push: true tags: gitea.rannes.dev/rannes.dev/local-weather:latest - build-args: | - PLACES_API=${{ secrets.PLACES_API }} + secrets: places_api=${{ secrets.PLACES_API }} diff --git a/Dockerfile b/Dockerfile index 77fb1bd..195901e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,9 +31,11 @@ RUN \ FROM base AS runner WORKDIR /app +# Mount environment variables +RUN --mount=type=secret,id=places_api \ + cat /run/secrets/places_api + ENV NODE_ENV production -ARG PLACES_API -ENV PLACES_API ${PLACES_API} RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs