Add local Docker deployment and submodules
- docker-compose.yml: builder, nginx web server and a LaTeX container (profile "latex") for regenerating the SVG drawings - Makefile, scripts/fetch.sh, .env.example - 50ohm, 50ohm-contents-dl and 50ohm-ansible as submodules tracking branch sv Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
-include .env
|
||||
export
|
||||
|
||||
COMPOSE = docker compose
|
||||
|
||||
.PHONY: help fetch build up down logs rebuild drawings drawings-all drawings-one shell-latex remotes
|
||||
|
||||
help:
|
||||
@echo "make fetch init/update the submodules (scripts/fetch.sh)"
|
||||
@echo "make build generate the site into ./site-build"
|
||||
@echo "make up | down start/stop the local web server (http://127.0.0.1:8080)"
|
||||
@echo "make rebuild build, then (re)start the web server"
|
||||
@echo "make drawings regenerate drawings whose .tex is newer than the .svg (JOBS=4)"
|
||||
@echo "make drawings-all regenerate every drawing"
|
||||
@echo "make drawings-one ID=502"
|
||||
@echo "make remotes show git remotes of the three repos"
|
||||
|
||||
fetch:
|
||||
./scripts/fetch.sh
|
||||
|
||||
build:
|
||||
$(COMPOSE) --profile build run --rm build
|
||||
|
||||
up:
|
||||
$(COMPOSE) up -d web
|
||||
@echo "http://$(BIND_ADDR):$(WEB_PORT)"
|
||||
|
||||
down:
|
||||
$(COMPOSE) down
|
||||
|
||||
logs:
|
||||
$(COMPOSE) logs -f web
|
||||
|
||||
rebuild: build up
|
||||
|
||||
JOBS ?= 4
|
||||
drawings:
|
||||
$(COMPOSE) --profile latex run --rm latex --stale -j $(JOBS)
|
||||
|
||||
drawings-all:
|
||||
$(COMPOSE) --profile latex run --rm latex --all -j $(JOBS)
|
||||
|
||||
drawings-one:
|
||||
$(COMPOSE) --profile latex run --rm latex $(ID)
|
||||
|
||||
remotes:
|
||||
@for r in 50ohm 50ohm-contents-dl 50ohm-ansible; do echo "== $$r ($$(git -C $$r branch --show-current))"; git -C $$r remote -v; done
|
||||
Reference in New Issue
Block a user