Files
miti.sh/Makefile
Catalin Constantin Mititiuc 5c74ee4cbe Update base container image from "bookworm" to "trixie" (Debian 13) (#4)
These changes:

- Update base container image from Bookworm to Trixie Debian
- Update Pandoc version
- Add a `make shell` command

Caveats:

- Uses the "bookworm" version of OpenResty until "trixie" is released

Reviewed-on: #4
2025-11-25 23:56:19 +00:00

42 lines
951 B
Makefile

image = miti.sh
docker-run = docker run --rm -w /opt/app -v $(PWD):/opt/app $(image)
serve:
docker run --rm -it --init -v $(PWD):/opt/app -p 8080:80 $(image) \
sh -c "openresty -p /opt/app -g 'daemon off;' -c conf/dev.nginx.conf"
shell:
docker run --rm -it --init -v $(PWD):/opt/app -p 8080:80 $(image) bash
build:
$(if $(file), $(docker-run) sitegen build $(file), $(docker-run) sitegen)
build-pygments:
$(docker-run) moonc pygments.moon
image-rm:
docker image rm $(image)
image-build:
docker build -t $(image) .
lint:
$(docker-run) moonc -l .
test: build-pygments
./test.sh
host = 'gundi@miti.sh'
path = 'www/sites/miti.sh/html/'
deploy: confirm_deploy
rsync -rvuzL html/ $(host):$(path)
confirm_deploy:
@echo -n "Deploy previously generated site over ssh using rsync\n\n\
Server hostname $(host)?\n\
Path on server to deploy to $(path)?\n\n\
Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ]
.PHONY: confirm_deploy