diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml index e8e1bb5..c1b735b 100644 --- a/.gitea/workflows/pipeline.yaml +++ b/.gitea/workflows/pipeline.yaml @@ -34,5 +34,5 @@ jobs: context: . push: true tags: gitea.rannes.dev/rannes.dev/local-weather:latest - secrets: | - "places_api=${{ secrets.PLACES_API }}" + build-args: | + PLACES_API=${{ secrets.PLACES_API }} diff --git a/Dockerfile b/Dockerfile index 657c5ea..77fb1bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,10 @@ # syntax=docker/dockerfile:1.3 FROM node:18-alpine AS base - - FROM base AS deps RUN apk add --no-cache libc6-compat WORKDIR /app -# Debug: List files in current directory -RUN ls -la - COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ RUN ls -la # List files after copying to confirm presence RUN \ @@ -36,11 +31,9 @@ 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