# Terminal color magic :) GREEN := \033[0;32m YELLOW := \033[1;33m NC := \033[0m # Files COMPOSE_FILE := docker-compose.yaml all: help ## Start the entire infrastructure up: @printf "$(YELLOW)๐Ÿš€ Starting Zabbix services...$(NC)\n" @docker-compose -f $(COMPOSE_FILE) up -d @printf "$(GREEN)โœ… All services are up and running!$(NC)\n\n" ## Stop and clean everything down: @printf "$(YELLOW)๐Ÿงน Stopping and cleaning up...$(NC)\n" @docker-compose -f $(COMPOSE_FILE) down -v @printf "$(GREEN)โœ”๏ธ All stopped and volumes removed$(NC)\n\n" ## View logs (web and server) logs: @printf "$(YELLOW)๐Ÿ“œ Viewing web and server logs...$(NC)\n" @docker-compose -f $(COMPOSE_FILE) logs -f zabbix-web-740 zabbix-server-740 || true @printf "\n" ## Restart web interface only restart-web: @printf "$(YELLOW)๐Ÿ”„ Restarting web interface...$(NC)\n" @docker-compose -f $(COMPOSE_FILE) restart zabbix-web-740 @printf "$(GREEN)๐Ÿ’ซ Restart complete$(NC)\n\n" ## Status of all containers status: @printf "$(YELLOW)๐Ÿ“Š Checking container status...$(NC)\n" @docker ps --filter name=postgresql-server --filter name=zabbix-server-740 --filter name=zabbix-web-740 --filter name=zabbix-snmp @printf "\n" ## Check environment variables env-check: @printf "$(YELLOW)๐Ÿ” Checking environment variables (.env)...$(NC)\n" @cat .env | grep -v '^#' @printf "\n" ## Help help: @printf "\n" @printf "$(YELLOW)๐Ÿงญ Available commands:$(NC)\n" @printf " make up โ€” start all services\n" @printf " make down โ€” stop and remove volumes\n" @printf " make logs โ€” view web and server logs\n" @printf " make restart-web โ€” restart web interface only\n" @printf " make status โ€” show status of Zabbix components\n" @printf " make env-check โ€” check environment variables (.env)\n" @printf "\n"