Skip to content

Add garmin-grafana LXC script #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025

Conversation

aliaksei135
Copy link
Contributor

@aliaksei135 aliaksei135 commented May 9, 2025

✍️ Description

Adds a new LXC container script for garmin-grafana. This is an application to locally display fitness metrics from Garmin Connect using InfluxDB and Grafana.

🔗 Related PR / Issue

Link: N/A

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

@aliaksei135 aliaksei135 requested review from a team as code owners May 9, 2025 15:47
Copy link
Member

@CrazyWolf13 CrazyWolf13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thanks a lot for this script!
This seems like an awesome thing, I wanted to search something like this too.

this looks already pretty good, could you take a look at the marked things?

# Install python dependencies with uv
$STD uv sync --locked --project /opt/garmin-grafana/
# Setup grafana provisioning configs
# shellcheck disable=SC2016
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# shellcheck disable=SC2016

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following line needs to replace the string literal ${DS_GARMIN_STATS}, so any parameter expansion should be prevented, therefore I have kept it in single quotes. This causes a warning from the linter though. I think it should be kept in to prevent future edits from accidentally causing parameter expansions here.

See this line in the source repo.

It's not the way I would have done it, but here we are :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter check exclusions are kept in the vscode config, like so

"shellcheck.exclude": [
        "2164",
        "1090",
        "1091"
    ],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this exclude the check across the entire repo? It would still be useful in other scripts, just not in this edge case

@michelroegl-brunner michelroegl-brunner force-pushed the main branch 2 times, most recently from d24155b to 2a6341c Compare May 18, 2025 15:23
@MickLesk MickLesk merged commit 4e8067e into community-scripts:main May 20, 2025
1 check passed
@CrazyWolf13 CrazyWolf13 mentioned this pull request Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants