use port 7777 instead of 5000
This commit is contained in:
parent
aa99ccb094
commit
b263886434
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue