mirror of
https://github.com/hexastack/hexabot
synced 2024-11-22 17:48:21 +00:00
54 lines
723 B
Docker
54 lines
723 B
Docker
FROM node:18-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
COPY patches ./patches
|
|
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
FROM node:18-alpine AS development
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
COPY --from=builder /app/src/extensions ./src/extensions
|
|
|
|
COPY --from=builder /app/patches ./patches
|
|
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
|
|
ENV NODE_ENV=development
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["npm", "run", "start:debug"]
|
|
|
|
FROM node:18-alpine AS production
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
COPY --from=builder /app/src/extensions ./src/extensions
|
|
|
|
COPY --from=builder /app/patches ./patches
|
|
|
|
RUN npm ci --only=production
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["npm", "run", "start:prod"]
|