28 lines
677 B
Makefile
28 lines
677 B
Makefile
.PHONY: dev build push release
|
|
|
|
TIMESTAMP := $(shell date +%Y%m%d.%H%M)
|
|
IMAGE := git.coopcloud.tech/wiki-cafe/wiki-cafe-site
|
|
|
|
# Start development server
|
|
dev:
|
|
docker run --rm -v $(pwd):/src -p 1313:1313 hugomods/hugo:base-non-root-0.145.0 server -D
|
|
|
|
build:
|
|
docker build \
|
|
-t $(IMAGE):$(TIMESTAMP) \
|
|
-t $(IMAGE):latest \
|
|
--build-arg HUGO_BASEURL=https://wiki.cafe \
|
|
.
|
|
|
|
push:
|
|
docker push $(IMAGE):$(TIMESTAMP)
|
|
docker push $(IMAGE):latest
|
|
|
|
release: build push
|
|
@echo "Release created with timestamp: $(TIMESTAMP)"
|
|
@echo "Push to Gitea registry: make login tag-registry push-registry"
|
|
|
|
# Deploy
|
|
|
|
deploy:
|
|
docker stack deploy wiki-cafe-site --detach=true -c compose.yaml
|