{"id":15980817,"url":"https://github.com/macbre/docker-traefik","last_synced_at":"2026-01-16T16:35:04.759Z","repository":{"id":141987948,"uuid":"552982671","full_name":"macbre/docker-traefik","owner":"macbre","description":"Dockerized traefik v3 with auto-discovery of other containers on the same Docker network","archived":false,"fork":false,"pushed_at":"2026-01-13T10:54:32.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T13:40:48.527Z","etag":null,"topics":["non-root","traefik-docker","traefik-v3"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/macbre.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-17T14:26:29.000Z","updated_at":"2026-01-13T10:54:35.000Z","dependencies_parsed_at":"2024-06-18T13:19:44.969Z","dependency_job_id":"edf93ac0-1c09-4fb9-9d68-8c7160a9a35c","html_url":"https://github.com/macbre/docker-traefik","commit_stats":{"total_commits":59,"total_committers":1,"mean_commits":59.0,"dds":0.0,"last_synced_commit":"35ff80bab76ac91ef968df3489889fd700812d84"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/macbre/docker-traefik","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fdocker-traefik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fdocker-traefik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fdocker-traefik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fdocker-traefik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macbre","download_url":"https://codeload.github.com/macbre/docker-traefik/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fdocker-traefik/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["non-root","traefik-docker","traefik-v3"],"created_at":"2024-10-08T00:22:57.420Z","updated_at":"2026-01-16T16:35:04.742Z","avatar_url":"https://github.com/macbre.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-traefik\n[![CI](https://github.com/macbre/docker-traefik/actions/workflows/docker.yml/badge.svg)](https://github.com/macbre/docker-traefik/actions/workflows/docker.yml)\n\nDockerized `traefik v3` with auto-discovery of other containers on the same Docker network.\n\nThe **`traefik` container runs as nobody** and uses proxy to get restricted and limited access to the Docker socket.\n\n## Installing\n\n1. Clone this repo.\n2. Then run:\n\n```\nsudo chown nobody:nogroup letsencrypt/\necho \"HOSTNAME=$(hostname)\" \u003e .env\ndocker network create public-network\ndocker-compose pull\ndocker-compose up -d\n```\n\n## Making Docker containers auto-discoverable\n\n1. This Traefik instance runs on `public-network` network. Your containers should also use it:\n\n```yaml\n# make your ... container discoverable by traefik\n# https://docs.docker.com/compose/networking/#configure-the-default-network\n#\n# docker network create public-network\nnetworks:\n  default:\n    name: public-network\n    external: true\n```\n\n2. Add labels to your container.\n\n```yaml\n    # https://doc.traefik.io/traefik/user-guides/docker-compose/basic-example/\n    labels:\n      traefik.enable: true\n      traefik.http.routers.\u003cyour app name\u003e.rule: Host(`\u003cyour domain, e.g. myservice.foo.net\u003e`)\n      traefik.http.services.\u003cyour app name\u003e.loadbalancer.server.port: \"\u003c port where your service is bound too \u003e\"  # or rely on ports defined via EXPOSE\n```\n\n3. Make sure that your container own healthcheck also passes. Traefik filters out containers that do not pass Docker healthchecks:\n\n```yaml\n$ DOCKER_HOST=tcp://localhost:2375 docker ps --format json | jq -c \"[ .Names,.Status ]\"  -r\n[\"socks5\",\"Up 11 minutes (healthy)\"]\n[\"docker_socket_proxy\",\"Up 21 hours (healthy)\"]\n[\"whoami\",\"Up 21 hours\"]\n[\"traefik\",\"Up 21 hours (healthy)\"]\n```\n\n## Notes\n\nThis container exposes both http (80) and https (443) ports. It **supports both http/2 and http/3**.\n\nThere's also **the dashboard exposed on a local 58888 port** (this port is bound to the local interface only!).\n\nYou can use the 5888 port to get some information from the API about your running services and routers:\n\n```\n$ curl -s 127.0.0.1:58888/api/http/routers | jq -r '.[] | .service' | sort\nacme-http@internal\napi@internal\ndashboard@internal\nnoop@internal\nping@internal\nprometheus@internal\n\u003cyour app name\u003e\n```\n\n```\n$ curl -s 127.0.0.1:58888/api/http/services | jq '.[] | .serverStatus'\n{\n  \"http://172.x.x.x:8080\": \"UP\"\n}\n```\n\nResponses from HTTP services are getting the `x-served-by` header added automatically (via the `x-served-by@file` middleware), e.g.\n\n```\n$ curl https://localhost/whoami --insecure -H 'Host: macbre.local' -v 2\u003e\u00261 | grep x-served-by\n\u003c x-served-by: macbre.local\n```\n\n\u003e The response header's value is taken from the `HOSTNAME` env variable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fdocker-traefik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacbre%2Fdocker-traefik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fdocker-traefik/lists"}