{"id":18663091,"url":"https://github.com/asapdotid/dcc-traefik-http","last_synced_at":"2026-05-02T03:02:40.457Z","repository":{"id":113710941,"uuid":"589528815","full_name":"asapdotid/dcc-traefik-http","owner":"asapdotid","description":"Docker Compose Traefik HTTP Proxy for backend docker container service","archived":false,"fork":false,"pushed_at":"2024-04-26T08:00:27.000Z","size":534,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T16:43:04.236Z","etag":null,"topics":["docker","docker-compose","http","proxy","proxy-server","traefik","traefik-docker","traefik-v2"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/asapdotid.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}},"created_at":"2023-01-16T10:35:37.000Z","updated_at":"2024-04-26T08:00:31.000Z","dependencies_parsed_at":"2023-09-27T16:11:05.650Z","dependency_job_id":null,"html_url":"https://github.com/asapdotid/dcc-traefik-http","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdcc-traefik-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdcc-traefik-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdcc-traefik-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asapdotid%2Fdcc-traefik-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asapdotid","download_url":"https://codeload.github.com/asapdotid/dcc-traefik-http/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239487302,"owners_count":19646983,"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":["docker","docker-compose","http","proxy","proxy-server","traefik","traefik-docker","traefik-v2"],"created_at":"2024-11-07T08:15:00.388Z","updated_at":"2025-11-06T07:30:36.315Z","avatar_url":"https://github.com/asapdotid.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/assets/img/traefik-backend.png\" width=\"600\" /\u003e\n\u003c/p\u003e\n\n# Docker Compose Traefik - Proxy Container Service (HTTP :80)\n\nThis guide shows you how to deploy your containers behind Traefik reverse-proxy.\n\n## Run on Local Computer\n\nDocker container:\n\n-   Docker Socket Proxy (security) [Document](https://hub.docker.com/r/tecnativa/docker-socket-proxy/#!)\n-   Traefik [Document](https://hub.docker.com/_/traefik)\n-   Logger (logrotate \u0026 cron) `Custom for Alpine`\n-   Portainer (Optional) [Document](https://www.portainer.io/)\n\n### Step 1: Make Sure You Have Required Dependencies\n\n-   Git\n-   Docker\n-   Docker Compose\n\n#### Example Installation on Debian-based Systems:\n\nOfficial documentation for install Docker with new Docker Compose V2 [doc](https://docs.docker.com/engine/install/), and you can install too Docker Compose V1. Follow official documentation.\n\n```\nsudo apt-get install git docker-ce docker-ce-cli containerd.io docker-compose-plugin\n```\n\n### Step 2: Clone the Repository\n\n```bash\ngit clone https://github.com/asapdotid/dcc-traefik-http.git\ncd dcc-traefik-http\n```\n\nMake command help:\n\n```bash\nmake help\n```\n\n### Step 3: Make Initial Environment Variables\n\n```bash\nmake init\n```\n\nModified file in `.make/.env` for build image\n\n```ini\n# Project variables\nDOCKER_REGISTRY=docker.io\nDOCKER_NAMESPACE=asapdotid\nDOCKER_PROJECT_NAME=proxy\n```\n\n### Step 3: Make Initial Environment Variables\n\n```bash\nmake set-init\n```\n\nModified file in `src/.env` for build image\n\n### Step 4: Set Your Own Password\n\nNote: when used in docker-compose.yml all dollar signs in the hash need to be doubled for escaping.\n\n\u003e Install `Apache Tools` package to using `htpasswd`\n\u003e To create a `user`:`password` pair, the following command can be used:\n\n```bash\necho $(htpasswd -nb user)\n\n# OR\n\necho $(htpasswd -nb user password)\n```\n\nRunning script:\n\n```bash\necho $(htpasswd -nb admin)\n\nNew password:\nRe-type new password:\n\nadmin:$apr1$W3jHMbEG$TCzyOICAWv/6kkraCHKYC0\n```\n\nor\n\n```bash\necho $(htpasswd -nb admin adminpass)\n\nadmin:$apr1$W3jHMbEG$TCzyOICAWv/6kkraCHKYC0\n```\n\nThe output has the following format: `username`:`password_hash`. The username doesn't have to be `admin`, feel free to change it (in the first line).\n\nEncode password hash with `base64`:\n\n```bash\necho '$apr1$W3jHMbEG$TCzyOICAWv/6kkraCHKYC0' | openssl enc -e -base64\nJGFwcjEkVzNqSE1iRUckVEN6eU9JQ0FXdi82a2tyYUNIS1lDMAo=\n```\n\nCheck decode:\n\n```bash\necho 'JGFwcjEkVzNqSE1iRUckVEN6eU9JQ0FXdi82a2tyYUNIS1lDMAo=' | openssl enc -d -base64\n```\n\nYou can paste the username into the `TRAEFIK_BASIC_AUTH_USERNAME` environment variable. The other part, `hashedPassword`, should be assigned to `TRAEFIK_BASIC_AUTH_PASSWORD_HASH`. Now you have your own `username`:`password` pair.\n\n### Step 5: Launch Your Deployment\n\nCreate docker network `secure` \u0026 `proxy` for external used with other docker containers:\n\n```bash\ndocker network create secure\"\n```\n\nand\n\n```bash\ndocker network create proxy\n```\n\nTo do copy env and build docker images with make commands:\n\n```bash\nmake set-init\n\nmake build\n```\n\nDocker composer make commands:\n\n```bash\nmake up\n# or\nmake down\n```\n\n### Step 6: Additional Docker Service\n\n-   Whoami\n-   Portainer\n\nCan remove or command.\n\n### Step 7: Test Your Deployment\n\n```bash\ncurl --insecure http://{domain_name}/\n```\n\nYou can also test it in the browser:\n\nhttp://{domain_name}/\n\nhttp://monitor.{domain_name}/\n\n## Deploying on a Public Server With Real Domain\n\nLet's say you have a domain `example.com` and it's DNS records point to your production server. Just repeat the local deployment steps, but don't forget to update `TRAEFIK_DOMAIN_NAME` environment variables. In case of `example.com`, your `src/.env` file should have the following lines:\n\n```ini\nTRAEFIK_DOMAIN_NAME=example.com\n```\n\nSetting correct email is important because it allows Let’s Encrypt to contact you in case there are any present and future issues with your certificates.\n\n## Optinonal add `Portainer` service\n\nUncomment on docker compose file for `Portainer` service:\n\nFile: `src/compose/docker-compose.local.yml`\n\n```yaml\nportainer:\n    image: portainer/portainer-ce:latest\n    restart: unless-stopped\n    security_opt:\n        - no-new-privileges:true\n    networks:\n        - secure\n        - proxy\n    volumes:\n        - /etc/localtime:/etc/localtime:ro\n        - ../../.data/portainer:/data\n    labels:\n        - traefik.enable=true\n        - traefil.docker.network=proxy\n        - traefik.http.routers.portainer.entrypoints=http\n        - traefik.http.routers.portainer.rule=Host(`portainer.${TRAEFIK_DOMAIN_NAME}`)\n        - traefik.http.services.portainer.loadbalancer.server.port=9000\n    depends_on:\n        - dockersocket\n        - traefik\n```\n\n## Internal Docker Compose Service Integrate with Traefik (`Labels`)\n\nSample:\n\n```yaml\n    ...\n    labels:\n      - traefik.enable=true\n      - traefil.docker.network=proxy\n      - traefik.http.routers.portainer.entrypoints=http\n      - traefik.http.routers.portainer.rule=Host(`app.${TRAEFIK_DOMAIN_NAME}`)\n```\n\nSample `nginx` service:\n\n```yaml\nnginx:\n    image: nginx:stable\n    networks:\n        - proxy\n    depends_on:\n        - traefik\n    labels:\n        - traefik.enable=true\n        - traefil.docker.network=proxy\n        - traefik.http.routers.portainer.entrypoints=http\n        - traefik.http.routers.portainer.rule=Host(`app.${TRAEFIK_DOMAIN_NAME}`)\n```\n\nRead instruction after container up [instruction](docs/portainer.md)\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis Docker Compose Traefik HTTP was created in 2022 by [Asapdotid](https://github.com/asapdotid) 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasapdotid%2Fdcc-traefik-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasapdotid%2Fdcc-traefik-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasapdotid%2Fdcc-traefik-http/lists"}