diff --git a/fitbit-garmin-sync.nomad b/fitbit-garmin-sync.nomad new file mode 100644 index 0000000..9ff3783 --- /dev/null +++ b/fitbit-garmin-sync.nomad @@ -0,0 +1,29 @@ +job "fitbit-garmin-sync" { + datacenters = ["dc1"] + type = "service" + + group "sync" { + count = 1 + + task "fitbit-garmin-sync" { + driver = "docker" + + config { + image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/fitbit-garmin-sync:latest" + volumes = [ + "/mnt/Public/configs/fitbit-garmin-sync:/app/data" + ] + } + + # Sensible resource allocation for a lightweight Python script. + resources { + cpu = 100 # MHz + memory = 128 # MB + } + + # The service does not expose any ports. + # The application is a scheduled job, not a long-running service. + # The command to run is defined in the Dockerfile ENTRYPOINT and CMD. + } + } +} \ No newline at end of file diff --git a/fitbitsync.py b/fitbitsync.py index 56bd872..17f5aa4 100644 --- a/fitbitsync.py +++ b/fitbitsync.py @@ -97,14 +97,14 @@ class ConfigManager: "client_secret": "", "access_token": "", "refresh_token": "", - "token_file": "data/fitbit_token.json", + "token_file": "fitbit_token.json", "redirect_uri": "http://localhost:8080/fitbit-callback" }, "garmin": { "username": "", "password": "", "is_china": False, # Set to True if using Garmin China - "session_data_file": "data/garmin_session.json" + "session_data_file": "garmin_session.json" }, "sync": { "sync_interval_minutes": 60, @@ -113,7 +113,7 @@ class ConfigManager: "read_only_mode": False # Set to True to prevent uploads to Garmin }, "database": { - "path": "data/weight_sync.db" + "path": "weight_sync.db" } } # Don't automatically save here, let the caller decide @@ -150,7 +150,7 @@ class ConfigManager: "client_secret": "", "access_token": "", "refresh_token": "", - "token_file": "data/fitbit_token.json", + "token_file": "fitbit_token.json", "redirect_uri": "http://localhost:8080/fitbit-callback" }