feat: configure Coolify to connect to internal terminal server

- Add TERMINAL_HOST and TERMINAL_PORT environment variables to Coolify app
- Configure Coolify to use dev_coolify_terminal container on port 6002
- Add dependency on coolify_terminal service with health check
- Keep terminal server internal-only without direct Traefik routing
- Coolify app will proxy /terminal/ws to internal terminal server

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-17 14:29:43 +01:00
parent 2b5d4d527d
commit 438bbccadf

View File

@@ -97,6 +97,8 @@ services:
depends_on:
coolify_soketi:
condition: service_started
coolify_terminal:
condition: service_healthy
volumes:
- coolify_data:/data/coolify
- /var/run/docker.sock:/var/run/docker.sock
@@ -125,6 +127,8 @@ services:
- PUSHER_APP_KEY=${DEV_COOLIFY_PUSHER_APP_KEY}
- PUSHER_APP_SECRET=${DEV_COOLIFY_PUSHER_APP_SECRET}
- PUSHER_SCHEME=https
- TERMINAL_HOST=${DEV_COMPOSE_PROJECT_NAME}_coolify_terminal
- TERMINAL_PORT=6002
- SSL_MODE=off
networks:
- compose_network
@@ -180,7 +184,7 @@ services:
# Watchtower
- "com.centurylinklabs.watchtower.enable=${WATCHTOWER_LABEL_ENABLE}"
# Coolify Terminal (WebSocket server on port 6002 for terminal)
# Coolify Terminal (WebSocket server on port 6002 - internal only, no Traefik routing)
coolify_terminal:
image: ${DEV_COOLIFY_REALTIME_IMAGE:-ghcr.io/coollabsio/coolify-realtime:1.0.10}
container_name: ${DEV_COMPOSE_PROJECT_NAME}_coolify_terminal
@@ -196,18 +200,6 @@ services:
retries: 10
networks:
- compose_network
labels:
- "traefik.enable=${DEV_TRAEFIK_ENABLED}"
# HTTPS router - NO path stripping, terminal server expects /terminal/ws
- "traefik.http.routers.${DEV_COMPOSE_PROJECT_NAME}-terminal.rule=Host(`${DEV_COOLIFY_TRAEFIK_HOST}`) && PathPrefix(`/terminal/ws`)"
- "traefik.http.routers.${DEV_COMPOSE_PROJECT_NAME}-terminal.entrypoints=web-secure"
- "traefik.http.routers.${DEV_COMPOSE_PROJECT_NAME}-terminal.tls.certresolver=resolver"
- "traefik.http.routers.${DEV_COMPOSE_PROJECT_NAME}-terminal.priority=100"
# Service
- "traefik.http.services.${DEV_COMPOSE_PROJECT_NAME}-terminal.loadbalancer.server.port=6002"
- "traefik.docker.network=${NETWORK_NAME}"
# Watchtower
- "com.centurylinklabs.watchtower.enable=${WATCHTOWER_LABEL_ENABLE}"
# n8n - Workflow automation platform
n8n: