https://github.com/kodeart/docker-nginx
Dockerized NGINX with Supervisor.
https://github.com/kodeart/docker-nginx
Last synced: 4 months ago
JSON representation
Dockerized NGINX with Supervisor.
- Host: GitHub
- URL: https://github.com/kodeart/docker-nginx
- Owner: kodeart
- Created: 2016-06-11T14:33:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-21T04:02:28.000Z (over 9 years ago)
- Last Synced: 2025-06-23T20:10:05.853Z (12 months ago)
- Language: Nginx
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://microbadger.com/images/mihailbinev/nginx "Get your own version badge on microbadger.com")
mihailbinev/nginx
=================
* nginx
* Supervisor
The nginx is started and monitored by Supervisor.
To pull the image
```sh
docker pull mihailbinev/nginx
```
If you want to build the image
```sh
docker build -t mihailbinev/nginx .
```
To run it
```sh
docker run --rm -it -v /path/to/project:/var/www/project -p 80:80 mihailbinev/nginx
```
With docker-compose
-------------------
With [https://docs.docker.com/compose/install/](docker-compose) everything is a bit bearable.
Add this in your project `docker-compose.yml` file.
```yml
nginx:
image: mihailbinev/nginx
ports:
- "80:80"
```
Of course, you should use the `volumes` to map container directories
to your host, enable other sites, add certificate files,
manipulate log directories, etc.
```yml
nginx:
image: mihailbinev/nginx
ports:
- "80:80"
volumes:
- /path/to/project:/var/www/PROJECT-NAME
- :/var/log/nginx
- :/etc/nginx/conf.d
- :/etc/nginx/certs
```
**It is important to map the path to the `PROJECT-NAME`**
Then run
```sh
docker-compose up
```
and finally visit `http://localhost/PROJECT-NAME` in your browser.
Notes
-----
The installation during the build may fail for no particular reason with this message `Failed to fetch http://httpredir.debian.org/debian/pool/main/x/xml-core...`
Just start building again.