Initial migration to eleventy
- Add dockerfile to run eleventy from - Add justfile to save useful commands
This commit is contained in:
10
docker/Dockerfile
Normal file
10
docker/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM node:latest
|
||||||
|
|
||||||
|
WORKDIR /opt/app
|
||||||
|
|
||||||
|
RUN npm init -y
|
||||||
|
RUN npm install @11ty/eleventy
|
||||||
|
|
||||||
|
COPY ./src .
|
||||||
|
|
||||||
|
CMD [ "npx", "@11ty/eleventy" ]
|
13
justfile
Normal file
13
justfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
set shell := ["bash", "-c"]
|
||||||
|
|
||||||
|
# List just commands by default
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Build image
|
||||||
|
build:
|
||||||
|
docker buildx build -f ./docker/Dockerfile --tag 11ty:latest .
|
||||||
|
|
||||||
|
# Run development server
|
||||||
|
dev: build
|
||||||
|
docker run -p 1280:8080 11ty:latest npx @11ty/eleventy --serve
|
Reference in New Issue
Block a user