QUADLET_MGR := ./scripts/quadlet/manage.sh MODULES ?= core.tests run: bash $(QUADLET_MGR) up build: @if command -v docker-compose >/dev/null 2>&1; then \ docker-compose --env-file=stack.env build app; \ else \ OPERATION=uwsgi podman build --build-arg OPERATION=uwsgi -t localhost/xf/gia:prod -f Dockerfile .; \ fi stop: bash $(QUADLET_MGR) down log: bash $(QUADLET_MGR) logs status: bash $(QUADLET_MGR) status quadlet-install: bash $(QUADLET_MGR) install compose-run: docker-compose --env-file=stack.env up -d compose-stop: docker-compose --env-file=stack.env down compose-log: docker-compose --env-file=stack.env logs -f --names test: @if command -v docker-compose >/dev/null 2>&1; then \ docker-compose --env-file=stack.env run --rm app sh -c ". /venv/bin/activate && python manage.py test $(MODULES) -v 2"; \ else \ if podman ps --format '{{.Names}}' | grep -qx gia; then \ podman exec gia sh -lc "cd /code && . /venv/bin/activate && python manage.py test $(MODULES) -v 2"; \ else \ echo "Container 'gia' is not running. Start the stack first with 'make run' (or mrl)." >&2; \ exit 125; \ fi; \ fi migrate: @if command -v docker-compose >/dev/null 2>&1; then \ docker-compose --env-file=stack.env run --rm app sh -c ". /venv/bin/activate && python manage.py migrate"; \ else \ if podman ps --format '{{.Names}}' | grep -qx gia; then \ podman exec gia sh -lc "cd /code && . /venv/bin/activate && python manage.py migrate"; \ else \ echo "Container 'gia' is not running. Start the stack first with 'make run' (or mrl)." >&2; \ exit 125; \ fi; \ fi makemigrations: @if command -v docker-compose >/dev/null 2>&1; then \ docker-compose --env-file=stack.env run --rm app sh -c ". /venv/bin/activate && python manage.py makemigrations"; \ else \ if podman ps --format '{{.Names}}' | grep -qx gia; then \ podman exec gia sh -lc "cd /code && . /venv/bin/activate && python manage.py makemigrations"; \ else \ echo "Container 'gia' is not running. Start the stack first with 'make run' (or mrl)." >&2; \ exit 125; \ fi; \ fi auth: @if command -v docker-compose >/dev/null 2>&1; then \ docker-compose --env-file=stack.env run --rm app sh -c ". /venv/bin/activate && python manage.py createsuperuser"; \ else \ if podman ps --format '{{.Names}}' | grep -qx gia; then \ podman exec gia sh -lc "cd /code && . /venv/bin/activate && python manage.py createsuperuser"; \ else \ echo "Container 'gia' is not running. Start the stack first with 'make run' (or mrl)." >&2; \ exit 125; \ fi; \ fi token: @if command -v docker-compose >/dev/null 2>&1; then \ docker-compose --env-file=stack.env run --rm app sh -c ". /venv/bin/activate && python manage.py addstatictoken m"; \ else \ if podman ps --format '{{.Names}}' | grep -qx gia; then \ podman exec gia sh -lc "cd /code && . /venv/bin/activate && python manage.py addstatictoken m"; \ else \ echo "Container 'gia' is not running. Start the stack first with 'make run' (or mrl)." >&2; \ exit 125; \ fi; \ fi