use port 7777 instead of 5000

This commit is contained in:
Son NK 2019-07-03 12:12:19 +02:00 committed by Son NK
parent aa99ccb094
commit b263886434
5 changed files with 8 additions and 8 deletions

View File

@ -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"]

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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)