mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-11 00:45:26 +02:00
refactor(traefik): improve migration and removal of Traefik services
- Update Traefik service detection and removal logic in server and traefik setup - Use Docker service and container inspection methods for more robust service management - Add graceful migration and removal of existing Traefik services - Simplify image pulling and service removal process
This commit is contained in:
@@ -543,7 +543,14 @@ export const installRClone = () => `
|
||||
export const createTraefikInstance = () => {
|
||||
const command = `
|
||||
# Check if dokpyloy-traefik exists
|
||||
if docker ps -a --format '{{.Names}}' | grep -q '^dokploy-traefik$'; then
|
||||
if docker service inspect dokploy-traefik > /dev/null 2>&1; then
|
||||
echo "Migrating Traefik to Standalone..."
|
||||
docker service rm dokploy-traefik
|
||||
sleep 7
|
||||
echo "Traefik migrated to Standalone ✅"
|
||||
fi
|
||||
|
||||
if docker inspect dokploy-traefik > /dev/null 2>&1; then
|
||||
echo "Traefik already exists ✅"
|
||||
else
|
||||
# Create the dokploy-traefik container
|
||||
|
||||
Reference in New Issue
Block a user