feat: v0.2.0 — Docker deployment behind shared Traefik proxy (flight.dev.kkhost.pl)
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
FROM node:22-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
RUN npm run build
|
||||
|
||||
# No `output: 'standalone'`: the runtime stage keeps the full node_modules because
|
||||
# /api/mlworker/[file] reads maplibre-gl dist files from disk at runtime, and
|
||||
# /api/airports reads data/*.csv — both resolved relative to process.cwd().
|
||||
FROM node:22-alpine AS runtime
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1
|
||||
COPY --from=build /app ./
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user