mirror of
https://github.com/robonen/canvas-3d.git
synced 2026-03-20 02:44:40 +00:00
feat(repo): dockerfile
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user