diff --git a/Dockerfile b/Dockerfile index 89483464..232d7018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ RUN pip3 install -r requirements.txt COPY . . -CMD gunicorn wsgi:app -b 0.0.0.0:5000 -w 2 --timeout 15 --log-level DEBUG +CMD gunicorn wsgi:app -b 0.0.0.0:7777 -w 4 --timeout 15 --log-level DEBUG #CMD ["/usr/local/bin/gunicorn", "wsgi:app", "-k", "gthread", "-b", "0.0.0.0:5000", "-w", "2", "--timeout", "15", "--log-level", "DEBUG"] diff --git a/README.md b/README.md index c5e7f478..4fdafcc3 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,18 @@ Authorization code flow: -http://sl-server:5000/oauth/authorize?client_id=client-id&state=123456&response_type=code&redirect_uri=http%3A%2F%2Fsl-client%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 +http://sl-server:7777/oauth/authorize?client_id=client-id&state=123456&response_type=code&redirect_uri=http%3A%2F%2Fsl-client%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 Implicit flow: -http://sl-server:5000/oauth/authorize?client_id=client-id&state=123456&response_type=token&redirect_uri=http%3A%2F%2Fsl-client%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 +http://sl-server:7777/oauth/authorize?client_id=client-id&state=123456&response_type=token&redirect_uri=http%3A%2F%2Fsl-client%3A7000%2Fcallback&state=dvoQ6Jtv0PV68tBUgUMM035oFiZw57 Exchange the code to get the token with `{code}` replaced by the code obtained in previous step. -http -f -a client-id:client-secret http://localhost:5000/oauth/token grant_type=authorization_code code={code} +http -f -a client-id:client-secret http://localhost:7777/oauth/token grant_type=authorization_code code={code} Get user info: -http http://localhost:5000/oauth/user_info 'Authorization:Bearer {token}' +http http://localhost:7777/oauth/user_info 'Authorization:Bearer {token}' ## Template structure diff --git a/app/config.py b/app/config.py index cabf5f3b..16fab92c 100644 --- a/app/config.py +++ b/app/config.py @@ -13,7 +13,7 @@ else: load_dotenv() -URL = os.environ.get("URL") or "http://sl-server:5000" +URL = os.environ.get("URL") or "http://sl-server:7777" EMAIL_DOMAIN = os.environ.get("EMAIL_DOMAIN") or "sl" SUPPORT_EMAIL = os.environ.get("SUPPORT_EMAIL") or "support@sl" SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY") diff --git a/app/oauth/views/authorize.py b/app/oauth/views/authorize.py index adcf563e..544d6aa8 100644 --- a/app/oauth/views/authorize.py +++ b/app/oauth/views/authorize.py @@ -195,7 +195,7 @@ def generate_access_token() -> str: def get_host_name_and_scheme(url: str) -> (str, str): - """http://localhost:5000?a=b -> (localhost, http) """ + """http://localhost:7777?a=b -> (localhost, http) """ url_comp = urlparse(url) return url_comp.hostname, url_comp.scheme diff --git a/server.py b/server.py index fea66fc1..5b21cca4 100644 --- a/server.py +++ b/server.py @@ -252,4 +252,4 @@ if __name__ == "__main__": with app.app_context(): fake_data() - app.run(debug=True, host="0.0.0.0") + app.run(debug=True, host="0.0.0.0", port=7777)