Files
tvone-api/dockerfile
T
peter 7bf4579b5a
continuous-integration/drone/push Build is failing
rename
2026-04-19 20:18:09 +01:00

24 lines
423 B
Docker

FROM node:22-alpine
WORKDIR /app
# Enable pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Install deps
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy source
COPY . .
# Ensure env exists (optional safety for containers)
RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi
# Build NestJS
RUN pnpm build
EXPOSE 3000
CMD ["node", "dist/main"]