port=80
This commit is contained in:
parent
cff2530421
commit
b87861345f
|
@ -1,7 +1,7 @@
|
||||||
FROM python:slim
|
FROM python:slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 80
|
||||||
ADD nginx.conf.sigil ./
|
ADD nginx.conf.sigil ./
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN apt-get update && apt-get install -y gcc && pip install -r requirements.txt
|
RUN apt-get update && apt-get install -y gcc && pip install -r requirements.txt
|
||||||
|
|
|
@ -31,6 +31,3 @@ async def resolve_total_unread_counter(_, info):
|
||||||
author_id = info.context["author_id"]
|
author_id = info.context["author_id"]
|
||||||
|
|
||||||
return get_total_unread_counter(author_id)
|
return get_total_unread_counter(author_id)
|
||||||
|
|
||||||
|
|
||||||
unread_resolvers = {"Query": {"totalUnreadCounter": resolve_total_unread_counter}}
|
|
||||||
|
|
|
@ -19,7 +19,11 @@ async def check_auth(req):
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
return False, None
|
return False, None
|
||||||
r = response.json()
|
r = response.json()
|
||||||
user_id = r.get("data", {}).get("session", {}).get("user", {}).get("id", None)
|
user_id = (
|
||||||
|
r.get("data", {}).get("getSession", {}).get("user", {}).get("id", None)
|
||||||
|
if INTERNAL_AUTH_SERVER
|
||||||
|
else r.get("data", {}).get("session", {}).get("user", {}).get("id", None)
|
||||||
|
)
|
||||||
is_authenticated = user_id is not None
|
is_authenticated = user_id is not None
|
||||||
return is_authenticated, user_id
|
return is_authenticated, user_id
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from os import environ
|
from os import environ
|
||||||
|
|
||||||
PORT = 8080
|
PORT = 80
|
||||||
REDIS_URL = environ.get("REDIS_URL") or "redis://127.0.0.1"
|
REDIS_URL = environ.get("REDIS_URL") or "redis://127.0.0.1"
|
||||||
API_BASE = environ.get("API_BASE") or ""
|
API_BASE = environ.get("API_BASE") or ""
|
||||||
AUTH_URL = environ.get("AUTH_URL") or ""
|
AUTH_URL = environ.get("AUTH_URL") or ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user