From eef23cd9521c077ea4e976f598104d985d2750bc Mon Sep 17 00:00:00 2001 From: cryptorugmunch Date: Fri, 3 Jul 2026 02:38:43 +0200 Subject: [PATCH 1/2] fix(alembic): use db URL resolver so migrations use same DB as app --- alembic/env.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/alembic/env.py b/alembic/env.py index b277d38..e260ebe 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -4,16 +4,15 @@ from logging.config import fileConfig from sqlalchemy import engine_from_config, pool from alembic import context -from db import Base +from db import Base, _resolve_database_url config = context.config if config.config_file_name is not None: fileConfig(config.config_file_name) -db_url = os.getenv("PRY_DATABASE_URL") -if db_url is not None: - config.set_main_option("sqlalchemy.url", db_url) +# Always use the same URL resolution logic as the application. +config.set_main_option("sqlalchemy.url", os.getenv("PRY_DATABASE_URL") or _resolve_database_url()) target_metadata = Base.metadata exclude_tables = {"spatial_ref_sys"} -- 2.49.1 From 72c023018b8324a22fc1fe9ea633c7f91b56cae2 Mon Sep 17 00:00:00 2001 From: cryptorugmunch Date: Fri, 3 Jul 2026 02:41:54 +0200 Subject: [PATCH 2/2] fix(deploy): ensure /root/.pry dir and volume exist for SQLite migrations --- Dockerfile | 2 +- docker-compose.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index db650c9..e6d69bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ COPY routers/ ./routers/ COPY llm_providers/ ./llm_providers/ COPY stealth_scripts/ ./stealth_scripts/ COPY templates/ ./templates/ -RUN mkdir -p /app/sessions +RUN mkdir -p /app/sessions /root/.pry EXPOSE 8002 HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \ diff --git a/docker-compose.yml b/docker-compose.yml index 136b0c8..9d5765c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,9 @@ services: ports: - "127.0.0.1:8005:8002" volumes: + - pry-data:/root/.pry - pry-sessions:/app/sessions + env_file: .env environment: - PYTHONUNBUFFERED=1 - PRY_TIMEOUT=60 @@ -44,7 +46,7 @@ services: container_name: pry-flaresolverr restart: unless-stopped ports: - - "127.0.0.1:8191:8191" + - "127.0.0.1:8192:8191" environment: - LOG_LEVEL=info - CAPTCHA_SOLVER=none @@ -76,4 +78,5 @@ services: - tor volumes: + pry-data: pry-sessions: -- 2.49.1