.PHONY: build run stop clean logs restart test
IMAGE_NAME := seq-demo
CONTAINER_NAME := seq-demo
PORT := 5000
build:
docker build -t $(IMAGE_NAME) .
run: build
docker run -d --name $(CONTAINER_NAME) -p $(PORT):$(PORT) $(IMAGE_NAME)
@echo "Server running at http://localhost:$(PORT)"
run-fg: build
docker run --rm -p $(PORT):$(PORT) $(IMAGE_NAME)
stop:
docker stop $(CONTAINER_NAME) 2>/dev/null || true
docker rm $(CONTAINER_NAME) 2>/dev/null || true
clean: stop
docker rmi $(IMAGE_NAME) 2>/dev/null || true
logs:
docker logs -f $(CONTAINER_NAME)
restart: stop run
test:
@echo "Testing endpoints..."
@curl -s http://localhost:$(PORT)/health && echo
@curl -s http://localhost:$(PORT)/api/status && echo
@curl -s http://localhost:$(PORT)/echo/hello && echo