- Use npm ci with package-lock.json for deterministic builds - Handle missing public/ dir in web container - Update docker-compose with Timeweb Cloud DB config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
547 B
Docker
18 lines
547 B
Docker
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
COPY apps/api/package.json apps/api/
|
|
COPY packages/shared/package.json packages/shared/
|
|
RUN npm ci --workspace=apps/api --workspace=packages/shared
|
|
COPY apps/api apps/api
|
|
COPY packages/shared packages/shared
|
|
RUN npm run build --workspace=packages/shared
|
|
RUN npm run build --workspace=apps/api
|
|
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
COPY --from=builder /app/apps/api/dist ./dist
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
EXPOSE 3001
|
|
CMD ["node", "dist/main"]
|