mirror of
https://github.com/furyhawk/home_stack.git
synced 2026-07-21 10:16:47 +00:00
Add reset and info targets to Makefile for improved Podman management
This commit is contained in:
@@ -7,7 +7,7 @@ DB_VOLUME=home_app-db-data
|
||||
BACKUP_DIR=./backups
|
||||
|
||||
# Targets
|
||||
.PHONY: up down restart logs build
|
||||
.PHONY: up down restart logs build reset
|
||||
|
||||
up:
|
||||
podman compose up -d
|
||||
@@ -22,6 +22,14 @@ build:
|
||||
|
||||
restart: down build up
|
||||
|
||||
reset:
|
||||
podman compose down -v
|
||||
podman system prune -f
|
||||
podman volume prune -f
|
||||
podman network prune -f
|
||||
podman pod prune -f
|
||||
@echo "Environment completely reset. Use 'make build' then 'make up' to recreate."
|
||||
|
||||
backup:
|
||||
@mkdir -p $(BACKUP_DIR)
|
||||
$(eval TIMESTAMP := $(shell date +%Y%m%d_%H%M%S))
|
||||
@@ -68,9 +76,25 @@ help:
|
||||
@echo " make logs View the logs of the containers"
|
||||
@echo " make build Build the containers"
|
||||
@echo " make restart Restart the containers"
|
||||
@echo " make reset Completely reset Podman (containers, volumes, networks)"
|
||||
@echo " make backup Create a backup of the database volume"
|
||||
@echo " make restore Restore the database volume from a backup"
|
||||
@echo " make clean Remove all containers and volumes"
|
||||
@echo " make prune Remove all stopped containers and unused volumes"
|
||||
@echo " make info Display detailed information about Podman state"
|
||||
@echo " make help View this help message"
|
||||
@echo ""
|
||||
|
||||
info:
|
||||
@echo "===== Podman System Info ====="
|
||||
podman info
|
||||
@echo "\n===== Podman Networks ====="
|
||||
podman network ls
|
||||
@echo "\n===== Podman Volumes ====="
|
||||
podman volume ls
|
||||
@echo "\n===== Podman Containers ====="
|
||||
podman ps -a
|
||||
@echo "\n===== Podman Images ====="
|
||||
podman images
|
||||
@echo "\n===== Podman Compose Config ====="
|
||||
podman compose config
|
||||
|
||||
Reference in New Issue
Block a user