Added docker-compose.yml - #6
Conversation
|
Sorry for the late review; just came back from vacation where I had no Internet access. Some general comments:
|
| * `sudo docker container rm myAir` | ||
| * ``sudo docker run -d --name myAir -v "`pwd`/config.toml:/app/config.toml" --restart=always --memory=100m resmed-influx-image`` | ||
| 2. `cd resmed-influx` | ||
| 3. edit the .env with your myAir Credientals |
| } | ||
| } | ||
| with open(Path(__file__).with_name(CONFIG_FILE), "w") as config_file: | ||
| tomllib.dump(config_data, config_file) |
There was a problem hiding this comment.
Would this end up deleting an existing config? Not good if someone didn't take a backup of their config and updates to new version of container.
|
|
||
| def get_config(retry=False): | ||
| config_path = Path(__file__).with_name(CONFIG_FILE) | ||
| if config_path.is_dir(): |
There was a problem hiding this comment.
don't understand when this would happen?
| @@ -0,0 +1,14 @@ | |||
| RESMED_LOGIN=resmed_user_email | |||
There was a problem hiding this comment.
we've "lost" all the documentation of the parameters. Maybe add a comment that points to the template config file?
| RUN touch /app/config.toml | ||
|
|
||
| ENTRYPOINT python main.py | ||
| ENTRYPOINT ["python", "main.py"] |
There was a problem hiding this comment.
is this related to docker compose changes?
|
|
||
| ## Setup | ||
|
|
||
| Choose one of these 3 methods. |
There was a problem hiding this comment.
let's keep the ability to have separate influx and grafana separately (meaning: add a new method instead of replacing existing methods)
|
This PR adds support for environment variables, and removes the requirement for a config file, without breaking backwards compatibility. Feel free to update your PR to add docker compose functionality with updated instructions |
|
@latetedemelon : the changes to add env var support are in |
ResMed was the only source still requiring InfluxDB. Add a VictoriaMetrics backend so it can feed the shared platform store, selectable via [main].backend (default 'victoriametrics', 'influx' still supported). - victoria.py: VictoriaConnector mirroring InfluxConnector's interface; tracks last-imported time in a JSON state file (VM has no Flux to query it back), skips string fields, tags series provider=resmed - main.py: choose backend at runtime; influxdb-client now imported lazily - template.config.toml: new [victoria] section + backend selector - requirements.txt: add requests; mark influxdb-client optional - docker-compose.yml: VictoriaMetrics-based standalone stack
Should now work better "out of the box". Testing still required.