Dockerfile 574 B

123456789101112131415161718192021
  1. FROM node:20-alpine
  2. RUN apk add --no-cache npm
  3. WORKDIR /app
  4. COPY package.json ./
  5. COPY packages packages/
  6. COPY apps apps/
  7. COPY tsconfig.json ./
  8. # Convert pnpm workspace:* protocol to npm file: protocol
  9. RUN sed -i 's|"@shared/types": "workspace:\*"|"@shared/types": "file:../../packages/shared-types"|g' apps/api-server/package.json apps/web-dashboard/package.json apps/worker/package.json
  10. RUN npm install
  11. RUN cd packages/shared-types && npm run build
  12. RUN cd apps/api-server && npm run build
  13. EXPOSE 3001
  14. CMD ["node", "apps/api-server/dist/apps/api-server/src/main.js"]