Moved mounting env variables.
All checks were successful
Docker Build & Publish / Build Docker (push) Successful in 1m6s

This commit is contained in:
ChrQR 2024-05-18 00:20:15 +02:00
parent 43c88ad52e
commit f5ce2dbc71

View File

@ -1,14 +1,12 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
FROM node:18-alpine AS base FROM node:18-alpine AS base
FROM base AS deps FROM base AS deps
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
# Mount environment variables
RUN --mount=type=secret,id=places_api \
cat /run/secrets/places_api
# Debug: List files in current directory # Debug: List files in current directory
RUN ls -la RUN ls -la
@ -38,6 +36,10 @@ 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
RUN addgroup --system --gid 1001 nodejs RUN addgroup --system --gid 1001 nodejs