Cookbook for configuring a Kiddo Labs NodeJS Application
nginx
magic_shell
nodejs
Key | Type | Description | Default |
---|---|---|---|
['node_app']['name'] | String | The app name | app |
['node_app']['path'] | String | Define the path where the app will run | /var/apps/app |
['node_app']['user'] | String | Define the user that will run the app | ubuntu |
['node_app']['http'] | Boolean | Enable http in nginx | true |
['node_app']['http_port'] | Boolean | Port where http will listen | 80 |
['node_app']['https'] | Boolean | Enable https in nginx | false |
['node_app']['https_port'] | Boolean | Port where https will listen | false |
['node_app']['ssl']['certificate_path'] | String | Define the ssl certificate path **required when https enabled** | |
['node_app']['ssl']['certificate_key_path'] | String | Define the ssl certificate key path **required when https enabled** | |
['node_app']['server_name'] | String | Define the domain name that nginx will bind to | |
['node_app']['proxy_pass'] | String | Define the address that nginx will proxy | http://localhost:3000 |
Just include app
in your node's run_list
:
{
"name":"my_app",
"run_list": [
"recipe[node_app]"
]
}
To define environment variables just add attributes inside ['node_app']['env']