Files
FarmaFinder/apps/parapharmacy-api/Dockerfile
T
Antoni Nuñez Romeu 0c2f1cf928 fix: use npm install instead of npm ci in Dockerfile
npm ci requires package-lock.json which is at root level in monorepo.
npm install works without it.
2026-07-16 12:40:22 +02:00

23 lines
501 B
Docker

FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (production only)
RUN npm install --omit=dev
# Copy source code
COPY src/ ./src/
# Expose port
EXPOSE 3002
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3002/api/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) })"
# Start server
CMD ["node", "--env-file-if-exists=.env", "src/server.js"]