Add Dockerfile

This commit is contained in:
Gal 2024-11-21 18:55:12 +01:00
parent 6140ffe12b
commit 8b3075a09c
Signed by: gal
GPG Key ID: F035BC65003BC00B
1 changed files with 6 additions and 4 deletions

View File

@ -1,12 +1,14 @@
FROM node:20-slim
# Set the working directory
WORKDIR /usr/src/app
COPY package*.json ./
# Copy package.json and install dependencies
COPY package.json package-lock.json ./
RUN npm install
RUN npm install @11ty/eleventy-navigation
# Copy source files
COPY . .
CMD ["npx", "@11ty/eleventy", "--serve", "--port", "4000"]
# Default command to run Eleventy
CMD ["npx", "@11ty/eleventy", "--serve", "--port", "3000"]