diff --git a/docs/ENV.md b/docs/ENV.md index 7a9da6e..acac461 100755 --- a/docs/ENV.md +++ b/docs/ENV.md @@ -4,7 +4,7 @@ You can configure deployment settings by placing special variables in an `ENV` f ## Runtime Settings -* `AUTO_RESTART`: Piku will restart all workers every time the app is deployed. +* `PIKU_AUTO_RESTART` (boolean, defaults to `true`): Piku will restart all workers every time the app is deployed. ### Python diff --git a/examples/ENV b/examples/ENV index 2759aea..f875c48 100755 --- a/examples/ENV +++ b/examples/ENV @@ -2,6 +2,6 @@ # NGINX_HTTPS_ONLY=1 # NGINX_STATIC_PATHS=/path:dir,/path2:dir2... # NGINX_INCLUDE_FILE=nginx.conf -# AUTO_RESTART=1 +# PIKU_AUTO_RESTART=1 # PYTHON_VERSION=3 # NODE_VERSION=14.17.6 diff --git a/examples/nodejs-wisp/ENV b/examples/nodejs-wisp/ENV index 97312af..d30977b 100755 --- a/examples/nodejs-wisp/ENV +++ b/examples/nodejs-wisp/ENV @@ -1 +1 @@ -AUTO_RESTART=1 +PIKU_AUTO_RESTART=1 diff --git a/piku.py b/piku.py index f6c77d5..e20d095 100755 --- a/piku.py +++ b/piku.py @@ -846,7 +846,7 @@ def spawn_app(app, deltas={}): write_config(live, env) write_config(scaling, worker_count, ':') - if env.get("AUTO_RESTART", False): + if env.get('PIKU_AUTO_RESTART', 'true').lower() not in ['0', 'false']: config = glob(join(UWSGI_ENABLED, '{}*.ini'.format(app))) if len(config): echo("-----> Removing uwsgi configs to trigger auto-restart.")