{"id":18869200,"url":"https://github.com/kramber1024/url-shortener-nginx","last_synced_at":"2026-03-09T02:32:35.484Z","repository":{"id":249328134,"uuid":"831196519","full_name":"kramber1024/url-shortener-nginx","owner":"kramber1024","description":"🟢 NGINX reverse proxy configuration for URL Shortener","archived":false,"fork":false,"pushed_at":"2024-09-02T08:31:24.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T01:14:42.549Z","etag":null,"topics":["bitly","docker","nginx","nginx-configuration","nginx-docker","nginx-reverse-proxy","reverse-proxy","short-url","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kramber1024.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,"publiccode":null,"codemeta":null}},"created_at":"2024-07-19T22:36:02.000Z","updated_at":"2024-11-18T06:33:48.000Z","dependencies_parsed_at":"2024-12-30T23:32:21.387Z","dependency_job_id":null,"html_url":"https://github.com/kramber1024/url-shortener-nginx","commit_stats":null,"previous_names":["kramber1024/url-shortener-nginx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kramber1024/url-shortener-nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kramber1024%2Furl-shortener-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kramber1024%2Furl-shortener-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kramber1024%2Furl-shortener-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kramber1024%2Furl-shortener-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kramber1024","download_url":"https://codeload.github.com/kramber1024/url-shortener-nginx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kramber1024%2Furl-shortener-nginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30280863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:23:26.802Z","status":"ssl_error","status_checked_at":"2026-03-09T02:22:46.175Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bitly","docker","nginx","nginx-configuration","nginx-docker","nginx-reverse-proxy","reverse-proxy","short-url","url-shortener"],"created_at":"2024-11-08T05:16:08.996Z","updated_at":"2026-03-09T02:32:35.460Z","avatar_url":"https://github.com/kramber1024.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# URL Shortener NGINX\n\n\u003ca href=\"https://github.com/kramber1024/url-shortener-nginx/actions/workflows/tests.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/kramber1024/url-shortener-nginx/actions/workflows/tests.yml/badge.svg\" alt=\"Tests\"\u003e\u003c/a\u003e\n\u003ca href=\"./LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/license/kramber1024/url-shortener-nginx\" alt=\"License\"\u003e\u003c/a\u003e\n\n## Features\n\n- 🐋 [**Docker**](https://www.docker.com/) for production.\n- ✅ Tests with [**Pytest**](https://pytest.org/).\n\n\u003e [!WARNING]\n\u003e This repository is part of a larger project that consists of multiple repositories. Using this repository on its own is not recommended, as it may not function correctly without the other components of the project. For complete functionality and proper integration, please refer to the [kramber1024/url-shortener](https://github.com/kramber1024/url-shortener).\n\n## Usage\n\n### Requirements\n\n- 🐋 [**Docker**](https://www.docker.com/)\n\n\u003e [!NOTE]\n\u003e Please ensure that Docker is properly configured and running on your system.\n\n### Installation\n\nClone repository:\n```bash\ngit clone https://github.com/kramber1024/url-shortener-nginx.git\n```\n\nChange directory:\n```bash\ncd url-shortener-nginx\n```\n\n### Building an image from Dockerfile\n\nBuild the image using the following command:\n```bash\ndocker build ./nginx -t nginx:latest\n```\n\n### Running the container\n\nRun the container using the following command:\n```bash\ndocker run -d -p 80:80 -p 443:443 --env WEB_SERVER_HOST=host.docker.internal --env WEB_SERVER_PORT=26802 --name container-name nginx\n```\nArguments:\n- `-p 80:80 -p 443:443` - Expose ports 80 and 443 to the host.\n- `--env WEB_SERVER_HOST=host.docker.internal` - The host of the web server. You can replace `host.docker.internal` with the IP address of the web server.\n- `--env WEB_SERVER_PORT=26802` - The port of the web server. You can replace `26802` with the port of the web server.\n- `--name container-name` - The name of the container. You can replace `container-name` with any name you want.\n\n### Running the container with Docker Compose\n\nRun the container using the following command:\n```bash\ndocker-compose up -d\n```\n\nTo rebuild the container, use the following command:\n```bash\ndocker-compose up -d --build\n```\n\nEdit the [**compose.yaml**](./compose.yaml) file to change launch configuration.\n\n```yaml\nname: docker-compose\n\nservices:\n  nginx:\n    container_name: nginx # Change the container name\n\n    build:\n      tags:\n        - nginx:latest\n      context: ./nginx\n      dockerfile: Dockerfile\n\n    ports: # Change the ports\n      - \"80:80\"\n      - \"443:443\"\n\n    environment: # Change the environment variables\n      - WEB_SERVER_HOST=host.docker.internal\n      - WEB_SERVER_PORT=26802\n```\n\n## Running tests\n\n### Requirements\n\n- 🐋 [**Docker**](https://www.docker.com/)\n- 🐍 [**Python 3.12**](https://www.python.org/)\n\n### Installation\n\nClone repository:\n```bash\ngit clone https://github.com/kramber1024/url-shortener-nginx.git\n```\n\nChange directory:\n```bash\ncd url-shortener-nginx\n```\n\n### Preparing the environment\n\nCreate a virtual environment:\n```bash\npython -m venv venv\n```\n\nActivate the virtual environment:\n- On Windows:\n\n    ```bat\n    .\\venv\\Scripts\\activate\n    ```\n- On Linux and macOS:\n\n    ```bash\n    source venv/bin/activate\n    ```\n\nInstall Poetry:\n```bash\npip install poetry\n```\n\nInstall dependencies:\n```bash\npoetry install --only main --no-root\n```\n\n### Running the tests\n\nRun the tests using the following command:\n```bash\npytest\n```\n\n\u003e [!NOTE]\n\u003e Make sure that Docker is running before running the tests.\n\n```bash\n======================== test session starts ========================\nplatform win32 -- Python 3.12.2, pytest-8.2.2, pluggy-1.5.0\nrootdir: C:\\Users\\UserName\\url-shortener-nginx\nconfigfile: pyproject.toml\ncollected 2 items\n\ntests\\test_build.py .                                          [ 50%]\ntests\\test_run.py .                                            [100%]\n\n=================== 2 passed in 66.27s (0:01:06) ====================\n```\n\n## License\n\nThis project is licensed under the terms of the [**MIT license**](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkramber1024%2Furl-shortener-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkramber1024%2Furl-shortener-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkramber1024%2Furl-shortener-nginx/lists"}