Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imagine10255/bear-docker-nginx
nginx by docker-compose
https://github.com/imagine10255/bear-docker-nginx
docker docker-compose nginx
Last synced: 2 days ago
JSON representation
nginx by docker-compose
- Host: GitHub
- URL: https://github.com/imagine10255/bear-docker-nginx
- Owner: imagine10255
- Created: 2017-12-22T05:57:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-11T17:55:20.000Z (almost 2 years ago)
- Last Synced: 2023-03-04T22:35:12.989Z (over 1 year ago)
- Topics: docker, docker-compose, nginx
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/imagine10255/bear-docker-nginx
- Size: 315 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
bear-docker-nginx
====================================================Add the module (njs, http_headers_more) to the official method, and provide the basic template out of the box
## Getting Started
```bash
$ git clone https://github.com/imagine10255/bear-docker-nginx.git site-dev
$ cd site-dev# remove git version control
$ rm -rf ./.git# Option (first create network)
$ docker network create --driver bridge imdockgroup# Starting
$ docker-compose up
```> open test [http://localhost:8080/hello](http://localhost:8080/hello)
>
> open test [http://localhost:8080/test.html](http://localhost:8080/test.html)## How to use utils
use can be executed directly
```bash
$ chmod a+x ./utils.sh
```executed
```bash
$ utils.sh
```## Custom Config
add config to docker-compose.yml```
volumes:
- "./config/nginx/conf.d:/etc/nginx/conf.d"
- "/home/adminuser/service/ftp-server/data:/etc/nginx/html:ro"
``````
# options:
- "./config/nginx/nginx.conf:/etc/nginx/nginx.conf"
- "./config/nginx/site-modules:/etc/nginx/site-modules"
```## Reference Architecture:
```txt
bear-docker-nginx
├── config/nginx
| ├── conf.d # site config
| ├── site-module # site module
| | ├── njs # site module
| | └── proxy.conf # site module
| └── nginx.conf # nginx config
├── public # site static files
└── docker-compose.yml
```## Modify Build
modify dockerfile
```bash
ARG ENABLED_MODULES="ndk headers-more"
```run build
```bash
$ docker build . -t imagine10255/bear-docker-nginx:1.0.8
$ docker push imagine10255/bear-docker-nginx:1.0.8$ docker tag imagine10255/bear-docker-nginx:1.0.8 imagine10255/bear-docker-nginx:latest
$ docker push imagine10255/bear-docker-nginx:latest
```## Ref
- [use module issue](https://github.com/nginxinc/docker-nginx/issues/511#issuecomment-857555895)
- [use module step](https://github.com/nginxinc/docker-nginx/tree/master/modules#readme)
- [njs sample](https://www.gushiciku.cn/pl/gJu3/zh-tw)