sync
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m1s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m1s
This commit is contained in:
29
fitbit-garmin-sync.nomad
Normal file
29
fitbit-garmin-sync.nomad
Normal file
@@ -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.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -97,14 +97,14 @@ class ConfigManager:
|
|||||||
"client_secret": "",
|
"client_secret": "",
|
||||||
"access_token": "",
|
"access_token": "",
|
||||||
"refresh_token": "",
|
"refresh_token": "",
|
||||||
"token_file": "data/fitbit_token.json",
|
"token_file": "fitbit_token.json",
|
||||||
"redirect_uri": "http://localhost:8080/fitbit-callback"
|
"redirect_uri": "http://localhost:8080/fitbit-callback"
|
||||||
},
|
},
|
||||||
"garmin": {
|
"garmin": {
|
||||||
"username": "",
|
"username": "",
|
||||||
"password": "",
|
"password": "",
|
||||||
"is_china": False, # Set to True if using Garmin China
|
"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": {
|
||||||
"sync_interval_minutes": 60,
|
"sync_interval_minutes": 60,
|
||||||
@@ -113,7 +113,7 @@ class ConfigManager:
|
|||||||
"read_only_mode": False # Set to True to prevent uploads to Garmin
|
"read_only_mode": False # Set to True to prevent uploads to Garmin
|
||||||
},
|
},
|
||||||
"database": {
|
"database": {
|
||||||
"path": "data/weight_sync.db"
|
"path": "weight_sync.db"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Don't automatically save here, let the caller decide
|
# Don't automatically save here, let the caller decide
|
||||||
@@ -150,7 +150,7 @@ class ConfigManager:
|
|||||||
"client_secret": "",
|
"client_secret": "",
|
||||||
"access_token": "",
|
"access_token": "",
|
||||||
"refresh_token": "",
|
"refresh_token": "",
|
||||||
"token_file": "data/fitbit_token.json",
|
"token_file": "fitbit_token.json",
|
||||||
"redirect_uri": "http://localhost:8080/fitbit-callback"
|
"redirect_uri": "http://localhost:8080/fitbit-callback"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user