add docker build, makefile, and some more shit before we move forward

This commit is contained in:
Jan Novak
2026-02-14 22:18:02 +01:00
committed by kacerr
parent 215b51aadb
commit 5207c48890
11 changed files with 271 additions and 26 deletions

31
build/Makefile Normal file
View File

@@ -0,0 +1,31 @@
IMAGE_NAME := maru-hleda-byt
CONTAINER_NAME := maru-hleda-byt
VOLUME_NAME := maru-hleda-byt-data
PORT := 8080
.PHONY: build run stop logs scrape restart clean
build:
docker build -f build/Dockerfile -t $(IMAGE_NAME) .
run: build
docker run -d --name $(CONTAINER_NAME) \
-p $(PORT):8080 \
-v $(VOLUME_NAME):/app/data \
--restart unless-stopped \
$(IMAGE_NAME)
@echo "Map will be at http://localhost:$(PORT)/mapa_bytu.html"
stop:
docker stop $(CONTAINER_NAME) && docker rm $(CONTAINER_NAME)
logs:
docker logs -f $(CONTAINER_NAME)
scrape:
docker exec $(CONTAINER_NAME) bash /app/run_all.sh
restart: stop run
clean: stop
docker rmi $(IMAGE_NAME)