Commit graph

9 commits

Author SHA1 Message Date
570a37ffc0
Switch from native-tls to rustls for WebSocket TLS
- Removes OpenSSL dependency entirely
- Uses pure Rust TLS implementation (rustls)
- Simplifies Docker build (no OpenSSL packages needed)
- Fixes Alpine musl build compatibility issues
2026-01-16 17:43:53 -06:00
677c948f31
Add OpenSSL build dependencies to Dockerfile
Fixes build failure caused by missing openssl-dev and openssl-libs-static
packages needed for compiling tokio-tungstenite with native-tls feature
2026-01-16 17:41:11 -06:00
824f4388eb
Add automatic self-update capability to agent
The agent now checks for updates every hour and automatically updates
itself when a new version is available on Docker Hub.

Features:
- Periodic update checks (hourly via scheduler)
- Automatic Docker image pull when update available
- Graceful exit and restart with new version
- Non-blocking, runs in background task
- Requires Docker socket mount for self-update

Changes:
- Add UpdateInfo struct and get_update_info() function
- Add perform_self_update() to pull new image and restart
- Add update check ticker to scheduler (hourly)
- Include docker-cli in Dockerfile runtime stage
- Update docker-compose.example.yml with socket mount
- Update README and CLAUDE.md with auto-update docs

The agent will log update status:
- "Already running latest version" - no action
- "Performing self-update: X -> Y" - pulling new image
- "Exiting to allow restart with new version" - restarting

Requires:
- Docker socket mounted: /var/run/docker.sock:/var/run/docker.sock
- restart: unless-stopped in docker-compose (to restart after exit)
2026-01-14 16:50:32 -06:00
7e2e50a764
Fix Docker permissions with automatic entrypoint script
The Docker container now handles data directory permissions automatically
without requiring manual user setup.

Changes:
- Added entrypoint.sh script that runs as root, fixes /data permissions,
  then drops to non-root user (towerops) using su-exec
- Updated Dockerfile to install su-exec and use the entrypoint script
- Container starts as root but immediately drops privileges after fixing
  permissions

The agent will now start successfully with just 'docker-compose up -d'
without users needing to run chown commands manually.
2026-01-14 09:36:45 -06:00
2b1d779279
Add multi-architecture build support (amd64, arm64) 2026-01-13 14:07:21 -06:00
82f97deeb2
Add protobuf compiler to CI and Docker build 2026-01-13 13:55:12 -06:00
fd1b02a6ea
update ci rust version 2026-01-09 13:36:10 -06:00
125b0f427e
update ci rust version 2026-01-09 13:34:43 -06:00
0f8cfc34e7
init 2026-01-09 13:22:15 -06:00