{"id":13567698,"url":"https://github.com/dbushell/docker-traefik","last_synced_at":"2025-04-24T21:30:40.911Z","repository":{"id":146433201,"uuid":"340443603","full_name":"dbushell/docker-traefik","owner":"dbushell","description":"🐁 Use Traefik to proxy Docker containers for *.localhost development.","archived":false,"fork":false,"pushed_at":"2024-08-10T12:50:31.000Z","size":15,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-04T22:37:31.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbushell.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":"2021-02-19T17:35:31.000Z","updated_at":"2024-08-10T12:50:35.000Z","dependencies_parsed_at":"2024-11-04T22:33:04.804Z","dependency_job_id":"48d41e0d-1d19-4654-bbed-9d7f4b2facb7","html_url":"https://github.com/dbushell/docker-traefik","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fdocker-traefik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fdocker-traefik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fdocker-traefik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbushell%2Fdocker-traefik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbushell","download_url":"https://codeload.github.com/dbushell/docker-traefik/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223968384,"owners_count":17233445,"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":"2024-08-01T13:02:39.634Z","updated_at":"2024-11-10T15:07:40.470Z","avatar_url":"https://github.com/dbushell.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# 🐋 Docker 🐁 Traefik 🦄 .Localhost\n\nUse Traefik to proxy Docker containers for `*.localhost` development. Assuming `*.localhost` domains resolve to the loopback interface.\n\nNow updated to provided HTTPS for a custom domain.\n\n## Usage\n\nCreate a bridge network named `traefik`:\n\n```sh\ndocker network create -d bridge traefik\n```\n\nCreate an `.env` file (chmod 600):\n\n```sh\nTRFK_HOST_IP=127.0.0.1\nTRFK_HTTP_PORT=80\nTRFK_HTTPS_PORT=443\nTRFK_ACME_DOMAIN=example.dev\nTRFK_ACME_EMAIL=hello@example.com\nTRFK_ACME_PROVIDER=cloudflare\nTRFK_ACME_RESOLVER=\"1.1.1.1:53\"\nCF_DNS_API_TOKEN=\"see: https://go-acme.github.io/lego/dns/cloudflare/\"\n```\n\nStart the Traefik container (this repo):\n\n```sh\ndocker-compose up -d\n```\n\n### Discovery\n\nTraefik will automatically discover containers in the `traefik` network that use labels. See [docker-compose.yml](/docker-compose.yml) for the full example service.\n\nInsecure `.localhost` domain:\n\n```yml\nlabels:\n  - \"traefik.enable=true\"\n  - \"traefik.http.routers.whoami.rule=Host(`whoami.localhost`)\"\n  - \"traefik.http.services.whoami.loadbalancer.server.port=80\"\n```\n\nSecure domain:\n\n```yml\nlabels:\n  - \"traefik.enable=true\"\n  - \"traefik.http.routers.whoami.entrypoints=websecure\"\n  - \"traefik.http.routers.whoami.rule=Host(`whoami.${TRFK_ACME_DOMAIN}`)\"\n  - \"traefik.http.services.whoami.loadbalancer.server.port=80\"\n```\n\nOr via the `dynamic.yml` config file:\n\n```yml\nhttp:\n  routers:\n    whoami:\n      entryPoints: ['websecure']\n      rule: \"Host(`whoami.{{ env \"TRFK_ACME_DOMAIN\" }}`)\"\n      service: whoami\n  services:\n    whoami:\n      loadBalancer:\n        servers:\n          - url: \"http://whoami\"\n```\n\nSee the [Traefik documentation](https://doc.traefik.io/traefik/providers/docker/) for more details.\n\n* * *\n\n[MIT License](/LICENSE) | Copyright © 2023 [David Bushell](https://dbushell.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbushell%2Fdocker-traefik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbushell%2Fdocker-traefik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbushell%2Fdocker-traefik/lists"}