{"id":18175048,"url":"https://github.com/melotic/home-server","last_synced_at":"2025-10-03T15:58:47.174Z","repository":{"id":155788427,"uuid":"631117331","full_name":"melotic/home-server","owner":"melotic","description":"🚀 Automated home server deployment","archived":false,"fork":false,"pushed_at":"2025-08-12T18:34:41.000Z","size":339,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T20:28:24.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melotic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2023-04-22T01:44:37.000Z","updated_at":"2025-08-12T18:34:36.000Z","dependencies_parsed_at":"2024-01-15T22:10:55.567Z","dependency_job_id":"eae73560-c7ca-427f-abd9-271669d27929","html_url":"https://github.com/melotic/home-server","commit_stats":{"total_commits":185,"total_committers":5,"mean_commits":37.0,"dds":"0.22702702702702704","last_synced_commit":"dbd6aa57206f76241ed47c7cbc52af7cb0da12c6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/melotic/home-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melotic%2Fhome-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melotic%2Fhome-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melotic%2Fhome-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melotic%2Fhome-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melotic","download_url":"https://codeload.github.com/melotic/home-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melotic%2Fhome-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271717082,"owners_count":24808589,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-02T16:08:38.792Z","updated_at":"2025-10-03T15:58:42.114Z","avatar_url":"https://github.com/melotic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# home-server\n\n🚀 Automated deployments to my home server. Complete with good 'ol fashioned rsync.\n\n*Ansible*? Never heard of it.\n\n```\n       _,met$$$$$gg.          justin@morpheus\n    ,g$$$$$$$$$$$$$$$P.       ---------------\n  ,g$$P\"     \"\"\"Y$$.\".        OS: Debian GNU/Linux 11 (bullseye) x86_64\n ,$$P'              `$$$.     Kernel: 5.10.0-21-amd64\n',$$P       ,ggs.     `$$b:   Uptime: 43 days, 2 hours, 41 mins\n`d$$'     ,$P\"'   .    $$$    Packages: 775 (dpkg)\n $$P      d$'     ,    $$P    Shell: bash 5.1.4\n $$:      $$.   -    ,d$$'    Terminal: /dev/pts/0\n $$;      Y$b._   _,d$P'      CPU: AMD Ryzen 5 1600 (12) @ 3.200GHz\n Y$$.    `.`\"Y$$$$P\"'         GPU: NVIDIA GeForce GTX 1070\n `$$b      \"-.__              Memory: 3296MiB / 15927MiB\n  `Y$$\n   `Y$$.\n     `$$b.\n       `Y$$b.\n          `\"Y$b._\n              `\"\"\"\n```\n\n## How it works\n\n1. `git push` to this repo\n2. GitHub Actions runs the `deploy.yml` workflow\n3. Download *secrets* (some of them really aren't secret)\n   1. Secrets for the docker-compose variables are stored in Azure Key Vault.\n   2. [`secrets/download-secrets-kv.sh`](secrets/download-secrets-kv.sh) downloads the secrets from Azure Key Vault and formats them into a `.env` file. \n4. Verify the `docker-compose.yml` has no missing *secrets* (*i.e.*, all env variables are defined)\n   1. [`secrets/check-secrets.sh`](secrets/check-secrets.sh) runs `docker compose config` to check for missing env variables.\n5. 🚀 Ship it\n   1. VPN with [Tailscale](https://tailscale.com/)\n   2. rsync the `docker-compose.yml` and `.env` files to the server, as well as all files in the [`tests`](tests) directory.\n   3. ssh in and run  `docker compose up -d --remove-orphans` on the server to start the containers.\n\n### \"*E2E*\" tests\n\nI configured some netdata alarms to monitor the health of the containers, and some HTTP healthchecks. If any of these fail, the deployment will fail.\n\nWe query the netdata API, `http://localhost:19999/api/v1/alarms`, and check for any alarms.\n\nSee [`tests/netdata.sh`](tests/netdata.sh) for the implementation.\n\n## Rollbacks\n\nIf the deployment fails, the server will be left in a broken state. To fix this, you can either:\n\n1. Manually fix the server\n2. Rollback to the previous deployment\n\nSo, we rollback. We do this by running `git checkout HEAD^`, and then running the same deployment again.\n\nThis leaves the server in a working state, but the repo's `main` branch no longer reflects the state of the server. [It is what it is.](https://www.youtube.com/shorts/KpXsfimrkFo)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelotic%2Fhome-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelotic%2Fhome-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelotic%2Fhome-server/lists"}