fix: create networks as bridge instead of external #6

Closed
Hermes wants to merge 1 commits from fix/network-creation into master
Collaborator

Problem

Docker stacks fail to start with error about missing external networks. The backup_net network (and all other networks) are declared as external: true but never created, causing a chicken-and-egg problem.

Root Cause

Both network/compose.yml and backup/compose.yml declare networks as:

networks:
backup_net:
external: true
name: backup_net

This requires the network to exist before the stack starts, but nothing creates it.

Solution

Changed network declarations from external to bridge driver:

networks:
backup_net:
driver: bridge
name: backup_net

Docker Compose will now automatically create the network when the stack starts.

Affected Networks

  • ai_net, auth_net, backup_net, cloud_net, coms_net, finance_net, home_auto_net, homepage_net, passman_net, tak_net, vc_net
  • traefik_backend (already had driver: bridge)

Deployment

cd /opt/data/infra
sudo nixos-rebuild switch --flake .#lazyworkhorse

Verification

docker network ls | grep backup_net
docker ps | grep restic
journalctl -u backup_stack -n 20

## Problem Docker stacks fail to start with error about missing external networks. The backup_net network (and all other networks) are declared as external: true but never created, causing a chicken-and-egg problem. ## Root Cause Both network/compose.yml and backup/compose.yml declare networks as: networks: backup_net: external: true name: backup_net This requires the network to exist before the stack starts, but nothing creates it. ## Solution Changed network declarations from external to bridge driver: networks: backup_net: driver: bridge name: backup_net Docker Compose will now automatically create the network when the stack starts. ## Affected Networks - ai_net, auth_net, backup_net, cloud_net, coms_net, finance_net, home_auto_net, homepage_net, passman_net, tak_net, vc_net - traefik_backend (already had driver: bridge) ## Deployment cd /opt/data/infra sudo nixos-rebuild switch --flake .#lazyworkhorse ## Verification docker network ls | grep backup_net docker ps | grep restic journalctl -u backup_stack -n 20
Hermes added 1 commit 2026-04-29 18:51:05 +00:00
- Changed all networks from external: true to driver: bridge
- Fixes chicken-and-egg problem where networks must exist before stacks can start
- backup_net, ai_net, auth_net, cloud_net, coms_net, finance_net, home_auto_net, homepage_net, passman_net, tak_net, vc_net now created automatically
gortium closed this pull request 2026-05-16 11:16:03 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/compose#6
No description provided.