{"id":18292762,"url":"https://github.com/imagine10255/bear-docker-nginx","last_synced_at":"2025-04-12T10:50:21.030Z","repository":{"id":41842578,"uuid":"115081865","full_name":"imagine10255/bear-docker-nginx","owner":"imagine10255","description":"nginx by docker-compose","archived":false,"fork":false,"pushed_at":"2023-07-19T02:57:37.000Z","size":405,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T05:41:48.603Z","etag":null,"topics":["docker","docker-compose","nginx"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/imagine10255/bear-docker-nginx","language":"Dockerfile","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/imagine10255.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-12-22T05:57:07.000Z","updated_at":"2024-09-11T00:08:41.000Z","dependencies_parsed_at":"2023-01-21T09:45:34.296Z","dependency_job_id":null,"html_url":"https://github.com/imagine10255/bear-docker-nginx","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagine10255%2Fbear-docker-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagine10255%2Fbear-docker-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagine10255%2Fbear-docker-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagine10255%2Fbear-docker-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imagine10255","download_url":"https://codeload.github.com/imagine10255/bear-docker-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557844,"owners_count":21124165,"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","nginx"],"created_at":"2024-11-05T14:19:16.125Z","updated_at":"2025-04-12T10:50:21.007Z","avatar_url":"https://github.com/imagine10255.png","language":"Dockerfile","funding_links":[],"categories":["Web Service"],"sub_categories":[],"readme":"bear-docker-nginx\n====================================================\n\nAdd the module (njs, http_headers_more) to the official method, and provide the basic template out of the box\n\n## Getting Started\n```bash\n$ git clone https://github.com/imagine10255/bear-docker-nginx.git site-dev\n$ cd site-dev\n\n# remove git version control\n$ rm -rf ./.git\n\n# Option (first create network)\n$ docker network create --driver bridge imdockgroup\n\n# Starting\n$ docker-compose up\n```\n\n\u003e open test [http://localhost:8080/hello](http://localhost:8080/hello)\n\u003e\n\u003e open test [http://localhost:8080/test.html](http://localhost:8080/test.html)\n\n\u003cimg src=\"./preview.jpg\" align=\"center\" height=\"100\"/\u003e\n\n\n## How to use utils\n\nuse can be executed directly\n```bash\n$ chmod a+x ./utils.sh\n```\n\nexecuted\n```bash\n$ utils.sh\n```\n\n## Custom Config\nadd config to docker-compose.yml\n\n```\nvolumes:\n    - \"./config/nginx/conf.d:/etc/nginx/conf.d\"\n    - \"/home/adminuser/service/ftp-server/data:/etc/nginx/html:ro\"\n```\n\n```\n# options:\n    - \"./config/nginx/nginx.conf:/etc/nginx/nginx.conf\"\n    - \"./config/nginx/site-modules:/etc/nginx/site-modules\"\n```\n\n## Reference Architecture:\n\n```txt\nbear-docker-nginx\n├── config/nginx\n|           ├── conf.d           # site config\n|           ├── site-module      # site module\n|           |    ├── njs         # site module\n|           |    └── proxy.conf  # site module\n|           └── nginx.conf       # nginx config\n├── public                       # site static files\n└── docker-compose.yml\n```\n\n\n## Modify Build\nmodify dockerfile\n```bash\nARG ENABLED_MODULES=\"ndk headers-more\"\n```\n\nrun build\n```bash\n$ docker build . -t imagine10255/bear-docker-nginx:1.0.8\n$ docker push imagine10255/bear-docker-nginx:1.0.8\n\n$ docker tag imagine10255/bear-docker-nginx:1.0.8 imagine10255/bear-docker-nginx:latest\n$ docker push imagine10255/bear-docker-nginx:latest\n```\n\n## Ref\n- [use module issue](https://github.com/nginxinc/docker-nginx/issues/511#issuecomment-857555895)\n- [use module step](https://github.com/nginxinc/docker-nginx/tree/master/modules#readme)\n- [njs sample](https://www.gushiciku.cn/pl/gJu3/zh-tw)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagine10255%2Fbear-docker-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimagine10255%2Fbear-docker-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagine10255%2Fbear-docker-nginx/lists"}