This commit is contained in:
+3
-3
@@ -1,11 +1,11 @@
|
||||
# Telegram Bot Token (from @BotFather)
|
||||
TELEGRAM_BOT_TOKEN=8653489932:AAHhyOD1jtimE7kg0zoVCUVd3l0YEz_YJgg
|
||||
|
||||
# Direct Supabase Postgres connection (join supabase_default network, connect to db:5432)
|
||||
POSTGRES_HOST=db
|
||||
# Direct PostgreSQL connection
|
||||
POSTGRES_HOST=192.168.178.3
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=your-supabase-db-password
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DB=postgres
|
||||
|
||||
# Worker Configuration
|
||||
|
||||
@@ -11,6 +11,12 @@ services:
|
||||
- WEB_UI_PORT=8766
|
||||
# Scheduler staleness threshold in seconds
|
||||
- HEALTHCHECK_SCHEDULER_STALE_S=300
|
||||
# Direct PostgreSQL connection
|
||||
- POSTGRES_HOST=192.168.178.3
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_DB=postgres
|
||||
ports:
|
||||
- "8766:8766" # Web UI
|
||||
networks:
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ async def get_pool() -> asyncpg.Pool:
|
||||
global _pool
|
||||
if _pool is None:
|
||||
_pool = await asyncpg.create_pool(
|
||||
host=os.getenv("POSTGRES_HOST", "db"),
|
||||
host=os.getenv("POSTGRES_HOST", "192.168.178.3"),
|
||||
port=int(os.getenv("POSTGRES_PORT", "5432")),
|
||||
user=os.getenv("POSTGRES_USER", "postgres"),
|
||||
password=os.getenv("POSTGRES_PASSWORD"),
|
||||
|
||||
@@ -10,7 +10,7 @@ echo "[entrypoint] Waiting for database to be ready..."
|
||||
# Wait for PostgreSQL to accept connections (max 30s retries)
|
||||
for i in $(seq 1 30); do
|
||||
if python -c "import asyncpg,os,asyncio; asyncio.run(asyncpg.connect(
|
||||
host=os.getenv('POSTGRES_HOST','db'),
|
||||
host=os.getenv('POSTGRES_HOST','192.168.178.3'),
|
||||
port=int(os.getenv('POSTGRES_PORT','5432')),
|
||||
user=os.getenv('POSTGRES_USER','postgres'),
|
||||
password=os.getenv('POSTGRES_PASSWORD'),
|
||||
|
||||
@@ -22,7 +22,7 @@ MIGRATIONS_DIR = os.path.join(os.path.dirname(__file__), "migrations")
|
||||
def _dsn_parts() -> dict:
|
||||
"""Return a dict of DSN connection parameters from env vars."""
|
||||
return {
|
||||
"host": os.getenv("POSTGRES_HOST", "db"),
|
||||
"host": os.getenv("POSTGRES_HOST", "192.168.178.3"),
|
||||
"port": int(os.getenv("POSTGRES_PORT", "5432")),
|
||||
"user": os.getenv("POSTGRES_USER", "postgres"),
|
||||
"password": os.getenv("POSTGRES_PASSWORD"),
|
||||
|
||||
Reference in New Issue
Block a user