launch-fix

This commit is contained in:
Untone 2024-01-25 01:34:44 +03:00
parent e0e1e88882
commit fce949603e
2 changed files with 2 additions and 1 deletions

View File

@ -19,4 +19,4 @@ RUN apt-get update && apt-get install -y gcc curl && \
poetry install --no-dev poetry install --no-dev
# Run server.py when the container launches # Run server.py when the container launches
CMD ["python", "main.py"] CMD granian --interface asgi main:app

View File

@ -62,6 +62,7 @@ app.mount("/", GraphQL(schema, debug=True))
if __name__ == "__main__": if __name__ == "__main__":
Granian( Granian(
target="main:app", target="main:app",
port=8888,
interface=Interfaces.ASGI, interface=Interfaces.ASGI,
reload=True reload=True
).serve() ).serve()