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