Changed server.

This commit is contained in:
retoor 2025-02-19 23:23:24 +01:00
parent e06824f4ec
commit 821db3cb1a
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ services:
environment:
- PYTHONDONTWRITEBYTECODE=1
- PYTHONUNBUFFERED=1
entrypoint: ["gunicorn", "-w", "1", "-k", "aiohttp.worker.GunicornWebWorker", "snek.gunicorn:app","--bind","0.0.0.0:8081"]
entrypoint: ["gunicorn", "-w", "4", "-k", "aiohttp.worker.GunicornWebWorker", "snek.gunicorn:app","--bind","0.0.0.0:8081"]
#entrypoint: ["python","-m","snek.app"]
snecssh:
build:

View File

@ -127,8 +127,10 @@ class Application(BaseApplication):
return await super().render_template(template, request, context)
app = Application(db_path="sqlite:///snek.db")
async def main():
app = Application(db_path="sqlite:///snek.db")
await web._run_app(app, port=8081, host="0.0.0.0")
if __name__ == "__main__":