saveinmed/marketplace/Dockerfile
Tiago Yamamoto 5c59e7b5a1 docs: add DEVOPS guide and optimize Dockerfiles
- Add DEVOPS.md with complete deployment guide for apolo server
- Add DATABASE.md (unified schema documentation)
- Fix backend Dockerfile: Go 1.24 -> 1.23 (current stable)
- Add marketplace Dockerfile with pnpm + static-web-server
- Migrate marketplace from npm to pnpm
- Remove duplicate database-schema.md and DATABASE_SCHEMA.md
2025-12-29 17:00:42 -03:00

26 lines
616 B
Docker

# syntax=docker/dockerfile:1
# ===== STAGE 1: Build =====
FROM node:22-alpine AS builder
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm-marketplace,target=/pnpm/store \
pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
# ===== STAGE 2: Production (static-web-server ~3MB binary) =====
FROM joseluisq/static-web-server:2-alpine
COPY --from=builder /app/dist /public
# SPA mode: fallback para index.html
ENV SERVER_FALLBACK_PAGE=/public/index.html
ENV SERVER_ROOT=/public
ENV SERVER_PORT=3000
EXPOSE 3000