Sign inSign up

yousan/nginx-unit

By yousan

•Updated about 9 years ago

Docker for NGINX Unit

Image
2

1.1K

yousan/nginx-unit repository overview

⁠NGINX Unit

NGINX Unit is a dynamic web application server, designed to run applications in multiple languages.

https://www.nginx.com/products/nginx-unit/⁠

latest, 0.1.1 (docker/Dockerfile⁠)

⁠How to run

Run with docker-compose is rightly simple.

$ git clone https://github.com/yousan/nginx-unit
$ cd nginx-unit
$ docker-compose up

Socket file to connect unit server and json files to manage unit server are preserved.

$ sudo curl -X PUT -d @./json/wiki.json --unix-socket ./run/control.unit.sock http://localhost/ 

⁠Docker

you can use docker command

$ docker run --name some-nginx-unit -d yousan/nginx-unit

Create root and run directories, mount those directories.

$ docker run --name some-nginx-unit -v /var/www:/www/root -v /var/run:/var/run:rw  -p 8200:8200 -p 8300:8300  yousan/nginx-unit

⁠Send commands from Local

You can send curl requests from local host into docker container.

$ sudo curl -X PUT -d @./json/wiki.json --unix-socket ./run/control.unit.sock http://localhost/ 

Make sure you are bind directoriy (/var/run/) which have socket file (/var/run/control.sock)

Tag summary

Content type

Image

Digest

Size

256.9 MB

Last updated

about 9 years ago

docker pull yousan/nginx-unit