added docker and docker compose

This commit is contained in:
2026-06-30 17:57:07 +03:30
parent 744550deaa
commit 3a1ceaaf2e
3 changed files with 40 additions and 13 deletions
+2
View File
@@ -27,6 +27,8 @@ _rq_worker: subprocess.Popen[bytes] | None = None
def on_startup() -> None:
global _rq_worker
init_db()
if os.environ.get("SKIP_INTERNAL_WORKER", "").lower() in ("1", "true", "yes"):
return
redis_url = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
_rq_worker = subprocess.Popen(
[sys.executable, "-m", "rq", "worker", "--url", redis_url, "batch"],