From 1bb4aac32f511fdc3ca09743b6cebb19ca49e9e2 Mon Sep 17 00:00:00 2001 From: "R. Miles McCain" Date: Thu, 28 May 2020 21:40:43 +0000 Subject: [PATCH] Use $PORT env variable --- TEMPLATE.env | 11 ++--------- shynet/ssl.webserver.sh | 2 +- shynet/webserver.sh | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/TEMPLATE.env b/TEMPLATE.env index df9f3ee..156f20c 100644 --- a/TEMPLATE.env +++ b/TEMPLATE.env @@ -47,15 +47,8 @@ ONLY_SUPERUSERS_CREATE=True # Will skip only if value is False. PERFORM_CHECKS_AND_SETUP=True -# Your admin user's email. A temporary password will be printed -# to the console on first run. -SHYNET_ADMIN_EMAIL=you@example.com - -# The domain on which you'll be hosting Shynet. -SHYNET_HOST=shynet.example.com - -# What you'd like to call your Shynet instance. -SHYNET_WHITELABEL=My Shynet Instance +# The port that Shynet should bind to. Don't set this if you're deploying on Heroku. +PORT=8080 # Redis, queue, and parellization settings; not necessary for single-instance deployments. # Don't uncomment these unless you know what you are doing! diff --git a/shynet/ssl.webserver.sh b/shynet/ssl.webserver.sh index 647776d..e6d3aa6 100755 --- a/shynet/ssl.webserver.sh +++ b/shynet/ssl.webserver.sh @@ -3,7 +3,7 @@ # Start Gunicorn processes echo Launching Shynet web server... exec gunicorn shynet.wsgi:application \ - --bind 0.0.0.0:8080 \ + --bind 0.0.0.0:${PORT:-8080} \ --workers ${NUM_WORKERS:-1} \ --timeout 100 \ --certfile=cert.pem \ diff --git a/shynet/webserver.sh b/shynet/webserver.sh index 7c4da40..f018fb7 100755 --- a/shynet/webserver.sh +++ b/shynet/webserver.sh @@ -2,6 +2,6 @@ # Start Gunicorn processes echo Launching Shynet web server... exec gunicorn shynet.wsgi:application \ - --bind 0.0.0.0:8080 \ + --bind 0.0.0.0:${PORT:-8080} \ --workers ${NUM_WORKERS:-1} \ --timeout 100