Add Dockerfile
This commit is contained in:
parent
8b3075a09c
commit
bdf2940e7b
15
Dockerfile
15
Dockerfile
|
@ -1,14 +1,11 @@
|
|||
FROM node:20-slim
|
||||
|
||||
# Set the working directory
|
||||
FROM node:20-slim as builder
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy package.json and install dependencies
|
||||
COPY package.json package-lock.json ./
|
||||
COPY package.json .
|
||||
RUN npm ci
|
||||
RUN npm install
|
||||
|
||||
# Copy source files
|
||||
FROM node:20-slim
|
||||
WORKDIR /usr/src/app
|
||||
COPY --from=builder /usr/src/app/ /usr/src/app/
|
||||
COPY . .
|
||||
|
||||
# Default command to run Eleventy
|
||||
CMD ["npx", "@11ty/eleventy", "--serve", "--port", "3000"]
|
||||
|
|
Loading…
Reference in New Issue