Files
shop/Dockerfile
Michael Czechowski 44107c0734
Some checks failed
Build and publish / build (push) Failing after 19s
feat: extract shop from mp/shop — initial libreshop/shop
Source moved verbatim from mp/shop/ on 2026-04-29; mp was the first
concrete adapter consuming the libreshop toolkit. Builds and publishes
git.librete.ch/libreshop/shop on every main / v* push via the standard
.gitea/workflows/build.yml shared across libreshop components.
2026-04-29 17:48:56 +02:00

40 lines
852 B
Docker

# Builder stage (use debian-based image for native binding compatibility)
FROM node:22-slim AS builder
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund
# Copy source code
COPY . .
# Build the application
# No build args needed - Nuxt runtimeConfig is overridden at runtime via NUXT_* env vars
RUN npm run build
# Development stage
FROM builder AS dev
EXPOSE 9999
CMD ["npm", "run", "dev"]
# Production stage (can use slim image since we only need node runtime)
FROM node:22-slim AS prod
WORKDIR /app
# Copy built application from builder
COPY --from=builder /app/.output /app/.output
# Runtime defaults (overridden by docker-compose environment)
ENV NODE_ENV=production \
HOST=0.0.0.0 \
PORT=9999
EXPOSE 9999
CMD ["node", ".output/server/index.mjs"]