{"id":24626455,"url":"https://github.com/cbartram/hearthhub-sidecar","last_synced_at":"2025-03-20T00:18:48.544Z","repository":{"id":274056804,"uuid":"921714737","full_name":"cbartram/hearthhub-sidecar","owner":"cbartram","description":"A sidecar container which persists world files, backups, and metrics to S3 for a Valheim dedicated server.","archived":false,"fork":false,"pushed_at":"2025-02-28T15:36:21.000Z","size":413,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T20:50:57.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbartram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-24T13:30:36.000Z","updated_at":"2025-02-28T15:36:25.000Z","dependencies_parsed_at":"2025-02-09T16:24:42.627Z","dependency_job_id":"a4b86ee0-5295-4a5c-98b0-8980aa000e52","html_url":"https://github.com/cbartram/hearthhub-sidecar","commit_stats":null,"previous_names":["cbartram/hearthhub-sidecar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbartram%2Fhearthhub-sidecar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbartram%2Fhearthhub-sidecar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbartram%2Fhearthhub-sidecar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbartram%2Fhearthhub-sidecar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbartram","download_url":"https://codeload.github.com/cbartram/hearthhub-sidecar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244525576,"owners_count":20466548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-25T04:48:51.367Z","updated_at":"2025-03-20T00:18:48.539Z","avatar_url":"https://github.com/cbartram.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n   \u003cimg src=\"./resources/logo.webp\" height=\"300\" width=\"300\"\u003e\n\u003c/p\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n# HearthHub Sidecar\n\nA sidecar container which persists world files, backups, and metrics to S3 for a Valheim dedicated server. This application\nis designed to be run in a container which is on the **same** pod as the Valheim Dedicated Server. \n\nSee [HearthHub Kube Api's](https://github.com/cbartram/hearthhub-kube-api) create server handler file for more information on how the sidecar is deployed.\n\n## Building\n\nTo build the docker image  for the Valheim server run: `./build.sh 0.0.1` replacing `0.0.1` with\nthe image version you would like to use.\n\n\n## Configuration\n\nConfiguration for the sidecar is managed through environment variables (often loaded from a `ConfigMap`):\n\n- `BACKUP_FREQUENCY_MIN` - The duration in minutes when backups to S3 should occur.\n- `CLEANUP_FREQUENCY_MIN`- The duration in minutes when the cleanup process should run see \"[cleanup](#cleanup-process)\" for more details.\n- `MAX_BACKUPS` - The maximum number of backups to keep in S3 defaults to 3. Additional backups will be purged by the [cleanup process](#cleanup-process).\n- `S3_BUCKET` - The bucket name (without s3:// prefix) where backups should be stored.\n\n## Deployment\n\nThis container is not designed to be deployed in an isolated manner as it depends on volumes and AWS credentials being\npresent on the Valheim dedicated server pod. See the [Dockerfile]()https://github.com/cbartram/hearthhub-kube-api/blob/master/Dockerfile that runs the Valheim dedicated server.\n\nTherefore, it should be integrated and updated with the [HearthHub mod API](https://github.com/cbartram/hearthhub-mod-api) \nwhich is responsible for actually creating the server deployment on Kubernetes.\n\nTo build and run it locally you can use: `go build -o main .` but there is no guarantee this will function as expected\nsince the filesystem will likely differ.\n\n## Cleanup Process\n\nThe cleanup process is a configurable process which will purge the latest `MAX_BACKUPS` .fwl and .db file pairs from\nS3. The process will also delete any orphaned .fwl files without a .db pair. The process uses the `-world {name}` argument\nfrom the running `valheim` container to determine which backups are viable for deletion. This ensures that even an\nancient backup for `world-0` won't be purged while the server is running `-world world-1`.\n\n## Built With\n\n- [Kubernetes](https://kubernetes.io) - Container orchestration platform\n- [Helm](https://helm.sh) - Manages Kubernetes deployments\n- [Docker](https://docker.io/) - Container build tool\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code\nof conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [Semantic Versioning](http://semver.org/) for versioning. For the versions\navailable, see the [tags on this\nrepository](https://github.com/cbartran/hearthhub-mod-api/tags).\n\n## Authors\n\n- **cbartram** - *Initial work* -\n  [cbartram](https://github.com/cbartram)\n\n## License\n\nThis project is licensed under the [CC0 1.0 Universal](LICENSE)\nCreative Commons License - see the [LICENSE.md](LICENSE) file for\ndetails\n\n[contributors-shield]: https://img.shields.io/github/contributors/cbartram/hearthhub-sidecar.svg?style=for-the-badge\n[contributors-url]: https://github.com/cbartram/hearthhub-sidecar/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/cbartram/hearthhub-sidecar.svg?style=for-the-badge\n[forks-url]: https://github.com/cbartram/hearthhub-sidecar/network/members\n[stars-shield]: https://img.shields.io/github/stars/cbartram/hearthhub-sidecar.svg?style=for-the-badge\n[stars-url]: https://github.com/cbartram/hearthhub-sidecar/stargazers\n[issues-shield]: https://img.shields.io/github/issues/cbartram/hearthhub-sidecar.svg?style=for-the-badge\n[issues-url]: https://github.com/cbartram/hearthhub-sidecar/issues\n[license-shield]: https://img.shields.io/github/license/cbartram/hearthhub-sidecar.svg?style=for-the-badge\n[license-url]: https://github.com/cbartram/hearthhub-sidecar/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbartram%2Fhearthhub-sidecar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbartram%2Fhearthhub-sidecar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbartram%2Fhearthhub-sidecar/lists"}