{t("Get started by creating your first remote agent.")}
{t( "Application-wide agents that can poll devices for any organization. Only visible and manageable by superadmins." )}
<.table id="cloud-pollers-table" rows={@streams.cloud_pollers} row_link={fn {_id, agent} -> ~p"/agents/#{agent.id}" end} > <:col :let={{_id, agent}} label={t("Name")}>{t( "Fallback agent for organizations without a default agent configured. Devices with no assignment at any level will use this agent." )}
<.form for={%{}} phx-change="update_selected_global_default" class="max-w-md"><.icon name="hero-check-circle" class="h-4 w-4 inline" /> Currently using: {selected_poller.name}
<% else %><.icon name="hero-exclamation-triangle" class="h-4 w-4 inline" /> {t("Warning: Selected agent no longer exists. Please choose a new agent.")}
<% end %> <% else %><.icon name="hero-information-circle" class="h-4 w-4 inline" /> {t( "No global default configured. Devices without assignments will use direct Phoenix cluster polling." )}
<% end %>{t("Use the token and Docker Compose configuration below to deploy this agent.")}
{t("Click the token to select all, or use the Copy button")}
{t( "This configuration includes Watchtower for automatic agent updates. The agent will automatically update to the latest version every 12 hours." )}
services:
towerops-agent:
image: {@agent_image}
container_name: towerops-agent
restart: unless-stopped
environment:
- TOWEROPS_API_URL={url(@socket, ~p"/")}
- TOWEROPS_AGENT_TOKEN={@new_token.token}
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.scope=towerops"
watchtower:
image: containrrr/watchtower:latest
container_name: towerops-watchtower
restart: unless-stopped
environment:
# Check for updates every 12 hours (43200 seconds)
- WATCHTOWER_POLL_INTERVAL=43200
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_SCOPE=towerops
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LOG_LEVEL=info
# Use latest Docker API version
- DOCKER_API_VERSION=1.44
volumes:
- /var/run/docker.sock:/var/run/docker.sock