Enhance Docker setup for Traefik integration and network management. Added logic to connect containers to the external 'homelab' network and ensured proper network configuration for services in the docker-compose file.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
1 parent
2786aba3ef
commit
2623664504
2 files changed
+12
-3
No files matched your search
@@ -180,6 +180,14 @@ steps:
|
||||
cd docker
|
||||
docker compose pull
|
||||
docker compose up -d --remove-orphans
|
||||
# Traefik is on external `homelab`. Recreate can leave edge
|
||||
# containers on project `iled` only → gateway timeout.
|
||||
for c in iled-api iled-shop iled-admin; do
|
||||
docker network connect homelab "$$c" 2>/dev/null || true
|
||||
docker inspect -f \
|
||||
'{{range $$k, $$v := .NetworkSettings.Networks}}{{println $$k}}{{end}}' \
|
||||
"$$c" | grep -qx homelab
|
||||
done
|
||||
docker compose ps
|
||||
docker logout registry.zea.lt || true
|
||||
EOS
|
||||
|
||||
@@ -61,9 +61,10 @@ services:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
# homelab first: Traefik is there; iled for postgres/redis/proxy.
|
||||
networks:
|
||||
- iled
|
||||
- homelab
|
||||
- iled
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=homelab"
|
||||
@@ -79,8 +80,8 @@ services:
|
||||
depends_on:
|
||||
- api
|
||||
networks:
|
||||
- iled
|
||||
- homelab
|
||||
- iled
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=homelab"
|
||||
@@ -96,8 +97,8 @@ services:
|
||||
depends_on:
|
||||
- api
|
||||
networks:
|
||||
- iled
|
||||
- homelab
|
||||
- iled
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=homelab"
|
||||
|
||||
Reference in new issue
Block a user