2019-08-05 08:08:48 +00:00
# Configuring Piku via ENV
2017-05-14 22:55:07 +00:00
You can configure deployment settings by placing special variables in an `ENV` file deployed with your app.
## Runtime Settings
2021-12-07 09:35:46 +00:00
* `PIKU_AUTO_RESTART` (boolean, defaults to `true` ): Piku will restart all workers every time the app is deployed. You can set it to `0` /`false` if you prefer to deploy first and then restart your workers separately.
2019-11-13 17:55:16 +00:00
2019-07-13 15:29:34 +00:00
### Python
2017-05-14 22:57:56 +00:00
* `PYTHON_VERSION` (int): Forces Python 3
2017-05-14 22:55:07 +00:00
2019-07-13 15:29:34 +00:00
### Node
2019-08-05 08:08:48 +00:00
* `NODE_VERSION` : installs a particular version of node for your app if `nodeenv` is found on the path.
**Note**: you will need to stop and re-deploy the app to change the node version in a running app.
2019-07-13 15:29:34 +00:00
2017-05-14 22:55:07 +00:00
## Network Settings
* `BIND_ADDRESS` : IP address to which your app will bind (typically `127.0.0.1` )
* `PORT` : TCP port for your app to listen in (if deploying your own web listener).
## uWSGI Settings
* `UWSGI_MAX_REQUESTS` (integer): set the `max-requests` option to determine how many requests a worker will receive before it's recycled.
* `UWSGI_LISTEN` (integer): set the `listen` queue size.
* `UWSGI_PROCESSES` (integer): set the `processes` count.
* `UWSGI_ENABLE_THREADS` (boolean): set the `enable-threads` option.
* `UWSGI_LOG_MAXSIZE` (integer): set the `log-maxsize` .
* `UWSGI_LOG_X_FORWARDED_FOR` (boolean): set the `log-x-forwarded-for` option.
* `UWSGI_GEVENT` : enable the Python 2 `gevent` plugin
2021-02-27 18:08:59 +00:00
* `UWSGI_ASYNCIO` (integer): enable the Python 2/3 `asyncio` plugin and set the number of tasks
2019-08-22 16:40:00 +00:00
* `UWSGI_INCLUDE_FILE` : a uwsgi config file in the app's dir to include - useful for including custom uwsgi directives.
2021-02-27 13:18:46 +00:00
* `UWSGI_IDLE` (integer): set the `cheap` , `idle` and `die-on-idle` options to have workers spawned on demand and killed after _n_ seconds of inactivity.
2017-05-14 22:55:07 +00:00
## Nginx Settings
* `NGINX_SERVER_NAME` : set the virtual host name associated with your app
2017-05-14 23:27:37 +00:00
* `NGINX_CLOUDFLARE_ACL` (boolean): activate an ACL allowing access only from Cloudflare IPs
* `NGINX_STATIC_PATHS` : set an array of `/url:path` values
2019-06-20 14:05:18 +00:00
* `NGINX_HTTPS_ONLY` : tell nginx to auto-redirect non-SSL traffic to SSL site
2019-08-05 08:10:42 +00:00
* `NGINX_INCLUDE_FILE` : a file in the app's dir to include in nginx config `server` section - useful for including custom nginx directives.
2019-08-05 08:09:22 +00:00
* `NGINX_ALLOW_GIT_FOLDERS` : (boolean) allow access to `.git` folders (default: false, blocked)
2022-03-07 09:01:28 +00:00
## Acme Settings
* `ACME_ROOT_CA` : set the certificate authority that Acme should use to generate public ssl certificates (string, default: `letsencrypt.org` )