{"id":21425091,"url":"https://github.com/omaralsoudanii/nginx-docker-starter","last_synced_at":"2025-07-22T20:33:01.591Z","repository":{"id":46907430,"uuid":"401960037","full_name":"omaralsoudanii/NGINX-docker-starter","owner":"omaralsoudanii","description":"Dockerized NGINX with some tweaks","archived":false,"fork":false,"pushed_at":"2021-11-03T18:58:25.000Z","size":1057,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T09:14:03.123Z","etag":null,"topics":["boilerplate","brotli","buildx","caching","configuration","devops","docker","nginx","nginx-docker","nginx-proxy","starter"],"latest_commit_sha":null,"homepage":"https://mkreg.dev/","language":"HTML","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/omaralsoudanii.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}},"created_at":"2021-09-01T06:46:57.000Z","updated_at":"2023-09-01T06:29:22.000Z","dependencies_parsed_at":"2022-09-13T17:11:40.204Z","dependency_job_id":null,"html_url":"https://github.com/omaralsoudanii/NGINX-docker-starter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/omaralsoudanii/NGINX-docker-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralsoudanii%2FNGINX-docker-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralsoudanii%2FNGINX-docker-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralsoudanii%2FNGINX-docker-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralsoudanii%2FNGINX-docker-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omaralsoudanii","download_url":"https://codeload.github.com/omaralsoudanii/NGINX-docker-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaralsoudanii%2FNGINX-docker-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567555,"owners_count":23949379,"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-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["boilerplate","brotli","buildx","caching","configuration","devops","docker","nginx","nginx-docker","nginx-proxy","starter"],"created_at":"2024-11-22T21:26:47.201Z","updated_at":"2025-07-22T20:33:01.552Z","avatar_url":"https://github.com/omaralsoudanii.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGINX-docker-starter\n\n![nginx - Omar Alsoudani](https://user-images.githubusercontent.com/7079173/134287388-9eba7276-c2e0-4ace-95b3-56486aa6dcd4.jpg)\n\n[![Image published](https://github.com/omaralsoudanii/NGINX-docker-starter/actions/workflows/release.yaml/badge.svg)](https://github.com/omaralsoudanii/NGINX-docker-starter/actions/workflows/release.yaml)\n\nThis is a boilerplate NGINX configs using Docker, you can include it in your repo and add your server(s) config.\n\nDockerfile based on https://github.com/fholzer/docker-nginx-brotli \n\n\n\n## Usage\n\nThe docker image build is automatically triggered on new releases or tuning I make and published to **Docker Registry** and **GitHub Registry**  — this so you can run it fast instead of doing the whole build and compiling nginx from source, below is the links to both.\n\n**GitHub Registry**: https://github.com/omaralsoudanii/NGINX-docker-starter/pkgs/container/nginx-docker-starter\n\n**Docker Registry**: https://hub.docker.com/r/omaralsoudani/nginx-brotli\n\n## Examples\n\n- I added a working demo here, **make sure port 80**, or change it by removing `network_mode` in `docker-compose.yml` is not used and run the following:\n\n  ```bash\n  docker-compose up -d\n  ```\n  Then navigate to http://localhost — the files (just one file...) served from the public folder in the repository.\n\n- Add the image to a Dockerfile in your build process — check `Dockerfile.demo` for reference.\n\n- Add it in a docker compose file:\n\n```yaml\n  version: \"3.6\"\n  services:\n    mk-nginx:\n        image: omaralsoudani/nginx-brotli\n        container_name: mk-nginx\n        restart: unless-stopped\n        volumes:\n          - /etc/ssl/mk/ecc.pem:/etc/nginx/ssl/ecc.pem:ro\n          - /etc/ssl/mk/priv.key:/etc/nginx/ssl/priv.key:ro\n          - /etc/ssl/mk/ca_root.pem:/etc/nginx/ssl/ca_root.pem:ro\n          - /etc/ssl/mk/dh/dhparam.pem:/etc/nginx/ssl/dhparam.pem:ro\n          # The below disables docker logging to stdout and uses file system (I like it with logrotate)\n          - /var/log/nginx:/var/log/nginx \n        ports:\n          - 80:80\n          - 443:443\n        networks:\n          - mk_nginx\n\nnetworks:\n  mk_nginx:\n```\n\n- You could also check the configs and the docker setup that I use on my personal site [mkreg.dev](https://github.com/omaralsoudanii/mkreg.dev/tree/main/docker)\n\n- You could ignore the published images and build it by your self using the [`Dockerfile`](https://github.com/omaralsoudanii/NGINX-docker-starter/blob/main/Dockerfile) (do it within the repo, since I am using NGINX signing key to verify the image), then read the [Integration](#how-to-integrate-in-my-project)\n\n**Note**: Check the configration and read them, I documented most of the directives — some of them are only suitable for production, some are for proxy configration and the demo is static so I didn't use the caching or the proxy in the demo.\n\nRemove comments from those when it suits you (production, or you have a server that you want nginx to be a proxy) — Also some needs a bit of research before enabling them (I added a warning for those).\n\n## Why it's not synced with the original repo?\n\n- The original repo main goal is setting up NGINX with brotli, my goal is to have a centralized repo where I can keep up with changes \u0026 tweaks I make for my own.\n\n- In addition to adding new 3rd party modules ‑ at the time of writing I think I added `headers-more-nginx-module` and upgraded base Alpine image. Currently the final image size is **13.22MB**\n\n- So I made this as a standalone repo rather than forcing the original author to add stuff that meets my needs.\n## How to integrate in my project?\n\n1. Assuming your project is containerized\n2. You read the files and tweaked them based on your needs and server(s) hardware\n3. Read the [Usage](#usage) and [Examples](#examples) section, understood how to utilize the already built image\n4. At this point you pretty much only need to add it to your infrastructure\n5. Here is some rambling about NGINX https://mkreg.dev/writing/nginx-treats\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaralsoudanii%2Fnginx-docker-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomaralsoudanii%2Fnginx-docker-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaralsoudanii%2Fnginx-docker-starter/lists"}