Files
FEDEO/frontend/Dockerfile
flfeders 15e480ee9a
All checks were successful
Build and Release FEDEO / verify (push) Successful in 1m0s
Build and Release FEDEO / build-and-release (push) Successful in 6m4s
fix(build): isolate time tests by Docker build context
2026-10-07 19:02:23 +02:00

40 lines
1004 B
Docker

# --- Stage 1: Build ---
FROM node:22-alpine AS builder
WORKDIR /usr/src/nuxt-app
# Nur Files kopieren, die für die Installation nötig sind (besseres Caching)
COPY package*.json ./
RUN npm ci
# Restlichen Code kopieren und bauen
COPY . .
ARG FEDEO_VERSION=0.0.0-dev
ARG FEDEO_REVISION=unknown
ENV FEDEO_VERSION=$FEDEO_VERSION
ENV FEDEO_REVISION=$FEDEO_REVISION
RUN node --test tests/time-v2.test.cjs && npm run build
# --- Stage 2: Runtime ---
FROM node:22-alpine AS runner
ARG FEDEO_VERSION=0.0.0-dev
ARG FEDEO_REVISION=unknown
ENV FEDEO_VERSION=$FEDEO_VERSION
ENV FEDEO_REVISION=$FEDEO_REVISION
WORKDIR /usr/src/nuxt-app
# Von der Build-Stage NUR den fertigen .output Ordner kopieren
COPY --from=builder /usr/src/nuxt-app/.output ./.output
# Optional: Falls du statische Dateien aus public brauchst,
# sind diese normalerweise bereits in .output/public enthalten.
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000
ENV NODE_ENV=production
EXPOSE 3000
ENTRYPOINT ["node", ".output/server/index.mjs"]