sanamare/Dockerfile
Claude f377a14f79
Admin komplett, Rollen und Rechte, Zahlungsarten, Docker-Setup
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvuGvHpbAQ4syfuLuRvutL
2026-10-19 13:24:29 +00:00

31 lines
1.1 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Sanamare Shop – Produktions-Image
FROM node:22-alpine AS deps
WORKDIR /app
RUN apk add --no-cache openssl
COPY package.json package-lock.json ./
COPY prisma ./prisma
RUN npm ci
FROM node:22-alpine AS build
WORKDIR /app
RUN apk add --no-cache openssl
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npx prisma generate && npm run build
FROM node:22-alpine AS run
WORKDIR /app
RUN apk add --no-cache openssl && addgroup -S app && adduser -S app -G app
ENV NODE_ENV=production PORT=3000 HOSTNAME=0.0.0.0 UPLOAD_DIR=/app/uploads
COPY --from=build /app/.next/standalone ./
COPY --from=build /app/.next/static ./.next/static
COPY --from=build /app/public ./public
COPY --from=build /app/prisma ./prisma
COPY --from=build /app/src/lib/permissions.ts ./src/lib/permissions.ts
COPY --from=build /app/src/lib/payments/catalog.ts ./src/lib/payments/catalog.ts
COPY --from=deps /app/node_modules ./node_modules
COPY docker/entrypoint.sh /entrypoint.sh
RUN mkdir -p /app/uploads && chown -R app:app /app/uploads && chmod +x /entrypoint.sh
USER app
EXPOSE 3000
ENTRYPOINT ["/entrypoint.sh"]