An open API service indexing awesome lists of open source software.

https://github.com/willnode/summon

NGINX module to launch any program and forward requests to it
https://github.com/willnode/summon

Last synced: 10 months ago
JSON representation

NGINX module to launch any program and forward requests to it

Awesome Lists containing this project

README

          

# HTTP Summon App NGINX Module

A simple NGINX module to launch any program and forward HTTP requests to it.

Not yet ready for production. Primilarity built for [DOM Cloud](https://domcloud.co).

## Installation and Running Demo

```sh
make nginx-install
make build
make run
```

## Configuration

#### `summon_app_command ""`

**Required to activate summon module.**

Run app at ``. App must listen to `PORT` envar.

Use `proxy_pass http://localhost:$summon_port` to forward HTTP requests.

#### `summon_app_root `

Set app pwd at ``. Defaults to parent of `root`.

#### `summon_app_user `

Set app to run under user. Defaults to who owned the "file" found in args or `nobody`.

#### `summon_app_log `

Set app log to path. Defaults log to NGINX error.

#### `summon_app_idle_timeout `

Set app maximum time before getting killed because of idle traffic. Defaults 15 minutes. Set 0 to run indefinitely.

#### `summon_app_min_instance `

Spawn app at many times. Default is 1.

#### `summon_app_use_port `

Spawn app using reserved port. Will try kill any app listening to port before hand.
If `summon_app_min_instance` > 1 then app must spawn with `SO_REUSEADDR`.

If `summon_app_use_port` uses same number, test config should fail.

#### `summon_app_show_crash `

Show helpful diagnostic error information if app is crashing either at startup or in middle of request.