From 577d99a021321b1c0b5abd19130bcbe0f424352f Mon Sep 17 00:00:00 2001 From: furyhawk Date: Tue, 27 May 2025 20:24:43 +0800 Subject: [PATCH] refactor: Add network target to create traefik-public network before starting containers --- makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 5d8a31a..0d4967c 100644 --- a/makefile +++ b/makefile @@ -12,9 +12,13 @@ include $(ENV_FILE) export # Targets -.PHONY: up down restart logs build reset +.PHONY: up down restart logs build reset network -up: +network: + @podman network exists traefik-public || podman network create traefik-public + @echo "Traefik network ready." + +up: network podman compose --env-file $(ENV_FILE) up -d down: @@ -76,6 +80,7 @@ help: @echo "Makefile for managing Podman Compose" @echo "" @echo "Usage:" + @echo " make network Create the traefik-public network if it doesn't exist" @echo " make up Start the containers in detached mode" @echo " make down Stop the containers" @echo " make logs View the logs of the containers"