monorepo/services/Dockerfile
2021-04-01 19:58:41 +02:00

20 lines
322 B
Docker

FROM node:lts-alpine
# Working directory
WORKDIR /app
# Install dependencies
COPY package.json package-lock.json ./
RUN npm ci --silent
# Copy source
COPY . .
# Build and cleanup
ENV NODE_ENV=production
RUN npm run build \
&& npm prune
# Start server
CMD ["node", "./node_modules/moleculer/bin/moleculer-runner.js"]