{"id":17090730,"url":"https://github.com/arbarwings/docker-web-redirect","last_synced_at":"2025-04-12T22:28:32.814Z","repository":{"id":105171338,"uuid":"286019653","full_name":"Arbarwings/docker-web-redirect","owner":"Arbarwings","description":"Lightweight Docker image that redirects all web traffic to another domain/URL","archived":false,"fork":false,"pushed_at":"2024-11-21T11:29:31.000Z","size":12,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T16:38:15.757Z","etag":null,"topics":["docker","nginx","proxy","redirects"],"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/Arbarwings.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}},"created_at":"2020-08-08T10:13:16.000Z","updated_at":"2025-03-22T07:27:57.000Z","dependencies_parsed_at":"2023-12-26T03:22:24.816Z","dependency_job_id":"6044a674-f7f5-407b-8a14-57f618ae5f91","html_url":"https://github.com/Arbarwings/docker-web-redirect","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/Arbarwings%2Fdocker-web-redirect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arbarwings%2Fdocker-web-redirect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arbarwings%2Fdocker-web-redirect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arbarwings%2Fdocker-web-redirect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arbarwings","download_url":"https://codeload.github.com/Arbarwings/docker-web-redirect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639280,"owners_count":21137814,"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","nginx","proxy","redirects"],"created_at":"2024-10-14T13:56:34.767Z","updated_at":"2025-04-12T22:28:32.794Z","avatar_url":"https://github.com/Arbarwings.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-Web-Redirect #\n\nThis Docker container listens (by default) on port 80 and redirects all web traffic permanently to the given target domain/URL.\n\n_Hint: This repo was forked from https://github.com/MorbZ/docker-web-redirect._\n\n## Features ##\n- Nginx 1.27\n- Lightweight: Uses only ~2 MB RAM on Linux\n- Keeps the URL path and GET parameters\n- Permanent redirect (HTTP 301)\n- Image Size only ~25MB\n\n## Usage ##\n### Docker run ###\nThe target domain/URL is set by the `REDIRECT_TARGET` environment variable.\nThe port may be changed to another port than 80 by the `PORT` environment variable.\nPossible redirect targets include domains (`mydomain.com`), paths (`mydomain.com/my_page`) or specific protocols (`https://mydomain.com/my_page`).  \n\n**Example (Listen on Port 80):** `$ docker run --rm -d -e REDIRECT_TARGET=mydomain.com -p 80:80 arbarwings/docker-web-redirect`\n\n**Example (Listen on Port 8080):** `$ docker run --rm -d -e REDIRECT_TARGET=mydomain.com -e PORT=8080 -p 8080:8080 arbarwings/docker-web-redirect `\n\n### Paths are retained ###\nThe URL path and GET parameters are retained. That means that a request to `http://myolddomain.com/index.php?page=2` will be redirected to `http://mydomain.com/index.php?page=2` when `REDIRECT_TARGET=mydomain.com` is set.\n\n### Permanent redirects ###\nRedirects are permanent (HTTP status code 301). That means browsers will cache the redirect and will go directly to the new site on further requests. Also search engines will recognize the new domain and change their URLs. This means this image is not suitable for temporary redirects e.g. for site maintenance.\n\n## Docker Compose ##\nA sample docker-compose file that redirects any incomming domain to `mydomain.com` could look like this:\n\n```yaml\nversion: '3'\nservices:\n  redirect:\n    image: arbarwings/docker-web-redirect\n    restart: always\n    environment:\n      - REDIRECT_TARGET=mydomain.com\n```\n\n### Build the image yourself ###\n`$ docker build -t arbarwings/docker-web-redirect:latest .`\n\n### Source code ###\nhttps://github.com/Arbarwings/docker-web-redirect\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farbarwings%2Fdocker-web-redirect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farbarwings%2Fdocker-web-redirect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farbarwings%2Fdocker-web-redirect/lists"}