monorepo/services/Dockerfile

20 lines
322 B
Docker
Raw Permalink Normal View History

2021-04-01 17:58:41 +00:00
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"]