GithubHelp home page GithubHelp logo

nginx-unit's Introduction

NGINX Unit

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

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

Supported tags and respective Dockerfile links

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 directory (/var/run/) which have socket file (/var/run/control.sock) is bound.

memorandum for me

$ docker build --rm ./ -t yousan/nginx-unit && \
 docker-compose down && docker-compose up -d && \
 docker-compose exec nginx-unit curl -X PUT -d @/root/json/start.json --unix-socket /var/run/control.unit.sock http://localhost/ && \
 docker-compose exec nginx-unit /bin/bash

nginx-unit's People

Contributors

yousan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.