Minor tweaks to dockerfile and workflow
All checks were successful
Docker Build & Publish / Build Docker (push) Successful in 1m5s

This commit is contained in:
ChrQR 2024-05-18 00:30:21 +02:00
parent adfd1e9b82
commit 18ac1b46ae
2 changed files with 5 additions and 4 deletions

View File

@ -34,5 +34,4 @@ jobs:
context: . context: .
push: true push: true
tags: gitea.rannes.dev/rannes.dev/local-weather:latest tags: gitea.rannes.dev/rannes.dev/local-weather:latest
build-args: | secrets: places_api=${{ secrets.PLACES_API }}
PLACES_API=${{ secrets.PLACES_API }}

View File

@ -31,9 +31,11 @@ RUN \
FROM base AS runner FROM base AS runner
WORKDIR /app WORKDIR /app
# Mount environment variables
RUN --mount=type=secret,id=places_api \
cat /run/secrets/places_api
ENV NODE_ENV production ENV NODE_ENV production
ARG PLACES_API
ENV PLACES_API ${PLACES_API}
RUN addgroup --system --gid 1001 nodejs RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs RUN adduser --system --uid 1001 nextjs