{"id":21223877,"url":"https://github.com/ionghitun/nginx-proxy","last_synced_at":"2025-07-10T14:31:05.068Z","repository":{"id":92265023,"uuid":"257221325","full_name":"ionghitun/nginx-proxy","owner":"ionghitun","description":"Example using docker-compose with nginx-proxy and acme companion.","archived":false,"fork":false,"pushed_at":"2024-04-29T13:47:45.000Z","size":17,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-29T14:58:52.571Z","etag":null,"topics":["acme-companion","docker","docker-compose","nginx-proxy"],"latest_commit_sha":null,"homepage":"","language":null,"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/ionghitun.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-04-20T08:42:12.000Z","updated_at":"2024-04-29T13:47:49.000Z","dependencies_parsed_at":"2023-11-21T14:44:25.128Z","dependency_job_id":"9caf9b1d-708b-4a99-9f89-6617182fc6ab","html_url":"https://github.com/ionghitun/nginx-proxy","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionghitun%2Fnginx-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionghitun%2Fnginx-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionghitun%2Fnginx-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionghitun%2Fnginx-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ionghitun","download_url":"https://codeload.github.com/ionghitun/nginx-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225640560,"owners_count":17500980,"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":["acme-companion","docker","docker-compose","nginx-proxy"],"created_at":"2024-11-20T22:53:44.863Z","updated_at":"2025-07-10T14:31:05.062Z","avatar_url":"https://github.com/ionghitun.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nginx-Proxy Stack\n\nThis project provides a Docker Compose setup for [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) with optional support for [acme-companion](https://github.com/nginx-proxy/acme-companion) and [self-signed-proxy-companion](https://github.com/sebastienheyd/docker-self-signed-proxy-companion). It enables easy development of multiple\nprojects locally with virtual hosts using Docker and is also ready for live deployment.\n\n## Prerequisites\n\n- Docker Engine \u0026 Docker Compose\n- Git\n- Linux or Windows WSL2\n\n## Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/ionghitun/nginx-proxy.git\n   cd nginx-proxy\n   ```\n2. **Copy and configure environment variables**\n   ```bash\n   cp scripts/.env.example scripts/.env\n   export USER_ID=$(id -u)\n   export GROUP_ID=$(id -g)\n   # Edit other variables in scripts/.env as needed\n   ```\n3. **Create global nginx-proxy network**\n   ```bash\n   docker network create nginx-proxy\n   ```\n4. **Start the project**\n   ```bash\n   sh scripts/start.sh\n   ```\n\n## Configuration\n\n**Conf Configuration**: Edit `conf/custom.conf`\n\n### Compose Profiles\n\n- acme: Enables automatic SSL certificate generation using Let's Encrypt via acme-companion.\n- self-signed: Enables self-signed SSL certificate generation for local development via self-signed-proxy-companion.\n- leave COMPOSE_PROFILES empty to run only nginx-proxy without SSL support.\n\n### Example: Using Virtual Hosts in Containers\n\nTo enable virtual hosting for your containers, set port, environment and network:\n\n```yaml\nservices:\n    ...\n    nginx:\n        ...\n        ports:\n            - 80\n            - ...\n        environment:\n            VIRTUAL_HOST: example.com\n            VIRTUAL_PORT: 80\n            LETSENCRYPT_HOST: example.com\n            LETSENCRYPT_EMAIL: mail@example.com\n            ...\n        networks:\n            - nginx-proxy\n            - ...\n```\n\nFor multiple domains or subdomains:\n\n```yaml\nVIRTUAL_HOST: example.com,sub.example.com,example2.com\nVIRTUAL_PORT: 80\nLETSENCRYPT_HOST: example.com,sub.example.com,example2.com\nLETSENCRYPT_EMAIL: mail@example.com\n```\n\nWhen using the self-signed companion, add extra the `SELF_SIGNED_HOST` environment variable:\n\n```yaml\nenvironment:\n    SELF_SIGNED_HOST: example.com\n```\n\n### Trusting Self-Signed Certificates\n\nTo avoid browser warnings like \"Your connection is not private\" when using self-signed certificates, refer to\nthe [self-signed-proxy-companion](https://github.com/sebastienheyd/docker-self-signed-proxy-companion) documentation for instructions on trusting these certificates in your local\nenvironment.\n\n### Using Certificates with Vite Server\n\nTo use SSL certificates in applications like Vite, mount the certs directory as a read-only volume in your application container:\nTo have permissions to use, hosts must end in `.local`\n\n```yaml\nvolumes:\n    - /path/to/nginx-proxy/certs:/path/in/container/certs:ro\n```\n\n## Available scripts\n\n```bash\n./scripts/start.sh    # Start the containers\n./scripts/down.sh     # Stop the containers\n./scripts/build.sh    # Build or rebuild the containers\n./scripts/restart.sh  # Restart the containers\n```\n\n## Troubleshooting\n\n- **Permission Issues**: Ensure `USER_ID` and `GROUP_ID` in `scripts/.env` match your host user IDs.\n- **Docker Issues**: For older versions you might want to remove `COMPOSE_BAKE` from `.env`.\n- **Docker Compose Issues**: Please update and ensure you can use `docker compose`, not old version `docker-compose`\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n\n## Contributing\n\nContributions are welcome! Please open issues or submit pull requests following the repository guidelines.\n\n_Happy Coding_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionghitun%2Fnginx-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fionghitun%2Fnginx-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionghitun%2Fnginx-proxy/lists"}