Files
R-clone-setup/deploy/remote-machine/docker-compose.yml

44 lines
1.6 KiB
YAML

# =============================================================================
# REMOTE MACHINE BUNDLE — run on any machine that should appear in the fleet UI
# (e.g. a friend's system running his algorithm and syncing results).
#
# Setup on the remote machine:
# 1. Copy the repo's `sync-container/` and `monitor/agent/` folders next to
# this file (or copy the whole repo and use this file from deploy/remote-machine).
# 2. Fill in .env (see .env.example).
# 3. Put the algorithm's output folder in OUTPUT_DIR — anything written there
# is synced up and monitored.
# 4. docker compose up -d --build
# =============================================================================
services:
rclone-sync:
build: ../../sync-container
container_name: rclone-sync
environment:
- SYNOLOGY_HOST=${SYNOLOGY_HOST}
- SYNOLOGY_PORT=${SYNOLOGY_PORT}
- SYNOLOGY_USER=${SYNOLOGY_USER}
- SYNOLOGY_PASS=${SYNOLOGY_PASS}
- RC_PASSWORD=${RC_PASSWORD}
- SYNC_INTERVAL=120
# results go UP to the server under this machine's own path
- SYNC_1=up:/sources/results:${REMOTE_BASE}/${MACHINE_ID}
volumes:
- ${OUTPUT_DIR}:/sources/results:ro
- ./Sync_logs:/logs
restart: unless-stopped
agent:
build: ../../monitor/agent
container_name: rclone-agent
environment:
- MACHINE_ID=${MACHINE_ID}
- SITE=${SITE}
- COLLECTOR_URL=${COLLECTOR_URL} # e.g. http://100.x.y.z:8000 (Tailscale IP)
- AGENT_TOKEN=${AGENT_TOKEN}
- WATCH_DIRS=/sources/results
volumes:
- ./Sync_logs:/logs:ro
- ${OUTPUT_DIR}:/sources/results:ro
restart: unless-stopped