chore: align Traefik proxy setup and production deploy workflow
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-06 14:39:03 +01:00
parent f86b7f39f7
commit 725a1c1669
4 changed files with 60 additions and 24 deletions
+11 -6
View File
@@ -1,4 +1,4 @@
.PHONY: start stop restart logs build ps port health clean-orphans app-shell db-shell db-init db-migrate db-seed prisma-generate prisma-migrate help
.PHONY: start stop restart deploy logs build ps port health clean-orphans app-shell db-shell db-init db-migrate db-seed prisma-generate prisma-migrate help
MIGRATION_NAME ?= init
@@ -10,6 +10,11 @@ stop:
restart: stop start
deploy:
git pull
docker compose up -d --build
@git log -1 --oneline
logs:
docker compose logs -f --tail=200
@@ -20,7 +25,7 @@ ps:
docker compose ps
port:
docker compose port app 3000
@echo "https://mohfarawati.de"
clean-orphans:
docker compose up -d --remove-orphans
@@ -47,18 +52,18 @@ prisma-migrate:
docker compose exec app npx prisma migrate dev --name $(MIGRATION_NAME)
health:
@PORT=$$(docker compose port app 3000 | sed 's/.*://'); \
curl -sS "http://localhost:$$PORT/api/health"
curl -sS https://mohfarawati.de/api/health
help:
@echo "Available targets:"
@echo " make start Start all containers"
@echo " make stop Stop and remove containers"
@echo " make restart Restart all containers"
@echo " make deploy Pull latest code and deploy updated stack"
@echo " make logs Follow container logs"
@echo " make build Build images"
@echo " make ps Show container status"
@echo " make port Show random host port for app"
@echo " make port Show app public URL"
@echo " make clean-orphans Remove orphaned old containers"
@echo " make app-shell Open shell in app container"
@echo " make db-shell Open PostgreSQL shell"
@@ -67,4 +72,4 @@ help:
@echo " make db-seed Seed database data"
@echo " make prisma-generate Run prisma generate"
@echo " make prisma-migrate Create/apply dev migration"
@echo " make health Check app health endpoint"
@echo " make health Check app health endpoint via public domain"