Files
tvone-api/dockerfile
T

25 lines
457 B
Docker
Raw Normal View History

2026-04-18 00:33:27 +01:00
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 . .
2026-04-19 20:18:09 +01:00
# Ensure env exists (optional safety for containers)
RUN if [ ! -f .env ] && [ -f .env.example ]; then cp .env.example .env; fi
2026-04-19 20:04:51 +01:00
2026-04-18 00:33:27 +01:00
# Build NestJS
RUN pnpm build
EXPOSE 3000
2026-04-19 20:31:14 +01:00
# Change your CMD to this:
2026-04-19 20:39:48 +01:00
CMD ["node", "dist/src/main.js"]