{"id":19951245,"url":"https://github.com/torchbox/heroku-cloudflare-app-domain","last_synced_at":"2026-02-09T09:03:36.604Z","repository":{"id":66129413,"uuid":"444792576","full_name":"torchbox/heroku-cloudflare-app-domain","owner":"torchbox","description":"Create branded herokuapp.com domains through Cloudflare","archived":false,"fork":false,"pushed_at":"2025-01-23T17:05:56.000Z","size":65,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-03T18:37:55.783Z","etag":null,"topics":["cloudflare","heroku"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torchbox.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,"zenodo":null}},"created_at":"2022-01-05T12:18:39.000Z","updated_at":"2025-01-23T17:06:00.000Z","dependencies_parsed_at":"2025-05-03T18:44:31.144Z","dependency_job_id":null,"html_url":"https://github.com/torchbox/heroku-cloudflare-app-domain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/torchbox/heroku-cloudflare-app-domain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fheroku-cloudflare-app-domain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fheroku-cloudflare-app-domain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fheroku-cloudflare-app-domain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fheroku-cloudflare-app-domain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torchbox","download_url":"https://codeload.github.com/torchbox/heroku-cloudflare-app-domain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torchbox%2Fheroku-cloudflare-app-domain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29260426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cloudflare","heroku"],"created_at":"2024-11-13T01:07:18.488Z","updated_at":"2026-02-09T09:03:36.589Z","avatar_url":"https://github.com/torchbox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heroku Cloudflare App Domain\n\n[![Main](https://github.com/torchbox/heroku-cloudflare-app-domain/actions/workflows/main.yml/badge.svg)](https://github.com/torchbox/heroku-cloudflare-app-domain/actions/workflows/main.yml)\n\nCreating branded herokuapp.com-like domains using Cloudflare, based on the app name (eg `my-app-prod.example.com`).\n\n## Features\n\n- Set records for domains which don't exist\n- Update records which are set incorrectly\n- Delete records which aren't referenced any more in Heroku\n- Enable / refresh [ACM](https://devcenter.heroku.com/articles/automated-certificate-management) when an app has its domain updated.\n\n## Usage\n\nInstall the dependencies listed in `requirements.txt`, ideally into a virtual environment.\n\nSet some environment variables:\n\n- `CLOUDFLARE_API_TOKEN`: A Cloudflare API token, with access to the zone you wish to edit. \"DNS Edit\" is required for those zones.\n- `HEROKU_API_KEY`: API key from Heroku\n- `CLOUDFLARE_ZONE_ID`: The Cloudflare zone id of the domain to automatically create\n\nOptionally:\n\n- `APP_NAME`: A regex of app names to act on. Any not matching this will be skipped.\n- `HEROKU_TEAMS`: A comma separated list of Heroku teams to operate on. By default will use all apps the account has access to.\n- `ALLOWED_CNAME_TARGETS`: A comma-separated list of regexes which match CNAMEs. If these CNAMEs are found in place of the correct Heroku CNAME, they won't be overridden.\n- `LOG_LEVEL`: Log level to use (default \"INFO\").\n- `DRY_RUN`: Whether to perform actions, or just say they happened (Either `true` or `false` (default)).\n\nThese can also be set in a `.env` file.\n\nThen, simply run the `main.py`. To have the application loop for you, specify an interval in seconds with `$INTERVAL`.\n\n## Deployment\n\nIn some hosting environments, it may not be possible to run the container as a background job (eg [Cloud Run](https://cloud.google.com/run/)).\n\nTo account for this, the default container wraps the command in [`webhook`](https://github.com/adnanh/webhook).\n\nTo trigger the hook, send a `GET` request to `/hooks/trigger`. The webhook is protected by a token, which can be set using `$WEBHOOK_TOKEN`, and should be sent in the `X-Webhook-Token` header.\n\nTo run in a loop instead of a webhook, set `$INTERVAL` in the container.\n\nAlternatively, it's possible to run on Heroku using its [scheduler](https://devcenter.heroku.com/articles/scheduler). Just add a job for `/app/main.py`, and stop the web processes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorchbox%2Fheroku-cloudflare-app-domain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorchbox%2Fheroku-cloudflare-app-domain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorchbox%2Fheroku-cloudflare-app-domain/lists"}