diff --git a/Makefile b/Makefile index e9f55c2..777935d 100644 --- a/Makefile +++ b/Makefile @@ -102,6 +102,8 @@ init-peers: start: @echo "Starting Personal Internet Cell..." + @docker network inspect cell-network >/dev/null 2>&1 || \ + docker network create --driver bridge --subnet "$${CELL_NETWORK:-172.20.0.0/16}" cell-network PUID=$$(id -u) PGID=$$(id -g) $(DCF) --profile core up -d --build @echo "Services started. Check status with 'make status'" @@ -141,12 +143,15 @@ update: git pull @git stash pop --quiet 2>/dev/null || true @echo "Rebuilding and restarting services..." + @docker network inspect cell-network >/dev/null 2>&1 || \ + docker network create --driver bridge --subnet "$${CELL_NETWORK:-172.20.0.0/16}" cell-network PUID=$$(id -u) PGID=$$(id -g) $(DCF) --profile core up -d --build @echo "Update complete. Run 'make status' to verify." reinstall: @echo "Reinstalling Personal Internet Cell from scratch..." - PUID=$$(id -u) PGID=$$(id -g) $(DCF) --profile core down -v 2>/dev/null || true + PUID=$$(id -u) PGID=$$(id -g) $(DCF) --profile core down 2>/dev/null || true + docker network rm cell-network 2>/dev/null || true @sudo rm -rf config/ data/ @$(MAKE) setup @$(MAKE) start @@ -176,7 +181,8 @@ uninstall: y|Y) \ echo "Stopping containers and removing images..."; \ for f in data/services/*/docker-compose.yml; do [ -f "$$f" ] && PUID=$$(id -u) PGID=$$(id -g) docker compose -f "$$f" down 2>/dev/null || true; done; \ - PUID=$$(id -u) PGID=$$(id -g) $(DCF) --profile core down -v --rmi all 2>/dev/null || true; \ + PUID=$$(id -u) PGID=$$(id -g) $(DCF) --profile core down --rmi all 2>/dev/null || true; \ + docker network rm cell-network 2>/dev/null || true; \ echo "Deleting config/ and data/..."; \ sudo rm -rf config/ data/; \ echo "Uninstall complete. Git repo and scripts remain."; \ diff --git a/docker-compose.yml b/docker-compose.yml index e124fbe..1cf4e3b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -181,7 +181,4 @@ services: networks: cell-network: name: cell-network - driver: bridge - ipam: - config: - - subnet: ${CELL_NETWORK:-172.20.0.0/16} + external: true