{"id":29101895,"url":"https://github.com/tyilo/traefik-config","last_synced_at":"2025-07-31T14:34:14.404Z","repository":{"id":144985942,"uuid":"233780332","full_name":"tyilo/traefik-config","owner":"tyilo","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-08T23:18:03.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-17T18:47:30.978Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyilo.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":"2020-01-14T07:16:19.000Z","updated_at":"2023-03-08T23:18:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"07865a26-ee62-4650-8869-297094792595","html_url":"https://github.com/tyilo/traefik-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tyilo/traefik-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2Ftraefik-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2Ftraefik-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2Ftraefik-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2Ftraefik-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyilo","download_url":"https://codeload.github.com/tyilo/traefik-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2Ftraefik-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268057203,"owners_count":24188617,"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-07-31T02:00:08.723Z","response_time":66,"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":"2025-06-28T21:08:44.753Z","updated_at":"2025-07-31T14:34:14.399Z","avatar_url":"https://github.com/tyilo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traefik v2 configuration\n\nMy production [Traefik](https://containo.us/traefik/) configuration.\n\nIt automatically redirects HTTP to HTTPS for all domains and retrieves TLS certificates for domains using [Let's Encrypt](https://letsencrypt.org/).\n\n## Setup\n\nYou probably want to replace `traefik.tyilo.com` in `docker-compose.yml` with your own domain name, where you want to access the Traefik dashboard from.\n\nFirst make sure to create `acme.json` and `usersfile`:\n\n```sh\ntouch acme.json usersfile\nchmod 600 acme.json\n```\n\nThen add a user to access the dashboard with:\n\n```sh\nhtpasswd usersfile \u003cusername\u003e\n```\n\n## Usage\n\nStart Traefik:\n\n```sh\nsudo docker-compose up -d\n```\n\nAnd start the [example server](example-server):\n\n```sh\ncd example-server\nsudo docker-compose up -d\n```\n\nYou can test the HTTP to HTTPS redirection with:\n\n```sh\ncurl -i http://example.localhost/\n```\n\n```\nHTTP/1.1 302 Found\nLocation: https://example.localhost/\nDate: Wed, 08 Apr 2020 09:04:45 GMT\nContent-Length: 5\nContent-Type: text/plain; charset=utf-8\n\nFound\n```\n\nAnd test the server with:\n\n```sh\ncurl -k https://example.localhost/\n```\n\n```\nYay, Traefik seems to work!\n```\n\nIf you want to access the website or Traefik's dashboard from your browser, you can add the following lines to your `/etc/hosts` file:\n\n```\n127.0.0.1 traefik.tyilo.com\n```\n\nand then access [https://traefik.tyilo.com/](https://traefik.tyilo.com/) or [https://example.localhost/](https://example.localhost/).\n\nYou will need to ignore the warning in your browser as you probably haven't obtained a valid TLS certificate for the domains.\n\n\n## HTTP/TLS passthrough\n\nSometimes you don't want to redirect HTTP to HTTPS for a specific domain.\n\nIn other cases, we don't want Traefik to do TLS termination, because we want our service to handle TLS itself.\n\n[example-passthrough](example-passthrough) shows configuration to do both of these.\nTo test it do the following:\n\n```sh\ncd example-passthrough\n./gen_cert\nsudo docker-compose up -d\n```\n\n\nHTTP passthrough can be tested with:\n\n```sh\ncurl -i http://passthrough.localhost/\n```\n\n```\nHTTP/1.1 200 OK\nAccept-Ranges: bytes\nContent-Length: 26\nContent-Type: text/html\nDate: Wed, 08 Apr 2020 09:15:02 GMT\nEtag: \"5e8d8ea8-1a\"\nLast-Modified: Wed, 08 Apr 2020 08:43:20 GMT\nServer: nginx/1.17.9\n\nHi from HTTP passthrough.\n```\n\nTLS passthrough can be tested with:\n\n```sh\ncurl -vk https://passthrough.localhost/\n```\n\n```\n...\n* Server certificate:\n*  subject: CN=passthrough.localhost\n...\n\u003e GET / HTTP/1.1\n\u003e Host: passthrough.localhost\n\u003e User-Agent: curl/7.69.1\n\u003e Accept: */*\n\u003e\n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 200 OK\n\u003c Server: nginx/1.17.9\n\u003c Date: Wed, 08 Apr 2020 09:17:48 GMT\n\u003c Content-Type: text/html\n\u003c Content-Length: 25\n\u003c Last-Modified: Wed, 08 Apr 2020 08:43:33 GMT\n\u003c Connection: keep-alive\n\u003c ETag: \"5e8d8eb5-19\"\n\u003c Accept-Ranges: bytes\n\u003c\nHi from TLS passthrough.\n* Connection #0 to host passthrough.localhost left intact\n```\n\nNote that the certificate the server uses is the self-signed certificate we just generated,\nmeaning Traefik didn't touch the TLS traffic.\n\n\n## Cleaning up\n\nAfter testing you can stop the docker containers with:\n\n```sh\nsudo docker-compose -f example-passthrough/docker-compose.yml down\nsudo docker-compose -f example-server/docker-compose.yml down\nsudo docker-compose down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyilo%2Ftraefik-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyilo%2Ftraefik-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyilo%2Ftraefik-config/lists"}