mirror of
https://github.com/robonen/canvas-3d.git
synced 2026-03-20 02:44:40 +00:00
24 lines
368 B
Docker
24 lines
368 B
Docker
ARG NODE_VERSION=18.12-slim
|
|
|
|
# Stage 1: Build the application
|
|
FROM node:${NODE_VERSION} AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
# See .dockerignore
|
|
COPY . .
|
|
|
|
RUN npm ci && npm cache clean --force && ls -a
|
|
|
|
# Stage 2: Run the application
|
|
FROM node:${NODE_VERSION}
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /build/src/.output .
|
|
|
|
VOLUME /app
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "./server/index.mjs"]
|