Commit 76ec5dc3 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix DB host: use 172.17.0.1 (Docker bridge gateway to host)

Supabase DB is on a compose-internal network not reachable via
CapRover service names. Docker bridge gateway routes to host where
port 5432 is bound. Also make migration non-fatal so server starts
regardless.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 3bbae90d
Pipeline #39 canceled with stages
...@@ -23,7 +23,7 @@ COPY migrations/ ./migrations/ ...@@ -23,7 +23,7 @@ COPY migrations/ ./migrations/
ENV NODE_ENV=production ENV NODE_ENV=production
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0
ENV PORT=80 ENV PORT=80
ENV DATABASE_URL=postgresql://supabase_admin:28ac17bf9d4f7a3d1bad045408102cf5@srv-captain--safe-supabase-db:5432/postgres ENV DATABASE_URL=postgresql://supabase_admin:28ac17bf9d4f7a3d1bad045408102cf5@172.17.0.1:5432/postgres
ENV SUPABASE_URL=https://safe-supabase-kong.caprover.al-arcade.com ENV SUPABASE_URL=https://safe-supabase-kong.caprover.al-arcade.com
ENV SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3MzU2ODk2MDAsImV4cCI6MTg5MzQ1NjAwMH0.wNfmuJNkX-bZwD7RbjxOChlRf_3Xm4I7bswEYTcDCg4 ENV SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3MzU2ODk2MDAsImV4cCI6MTg5MzQ1NjAwMH0.wNfmuJNkX-bZwD7RbjxOChlRf_3Xm4I7bswEYTcDCg4
ENV SUPABASE_JWT_SECRET=902343981eb82f43ff7a3757f3fcf25f14a2b9c729454eae5029ee3d1f189eb7 ENV SUPABASE_JWT_SECRET=902343981eb82f43ff7a3757f3fcf25f14a2b9c729454eae5029ee3d1f189eb7
......
...@@ -8,8 +8,7 @@ async function main() { ...@@ -8,8 +8,7 @@ async function main() {
try { try {
await runMigrations(databaseUrl); await runMigrations(databaseUrl);
} catch (err) { } catch (err) {
console.error('[migrate] FAILED:', err); console.error('[migrate] WARNING: migration failed, starting server anyway:', (err as Error).message);
process.exit(1);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment