psql access
This commit is contained in:
@ -39,4 +39,12 @@ else
|
||||
echo "Claude Code $(claude --version 2>/dev/null || echo '(version unknown)') ready."
|
||||
fi
|
||||
|
||||
# Proxy host postgres to 127.0.0.1:5432 inside the container so the app can
|
||||
# use the same DATABASE_URL whether running inside or outside Docker.
|
||||
if ! ss -tlnp 2>/dev/null | grep -q ':5432'; then
|
||||
echo "Starting postgres proxy 127.0.0.1:5432 -> host.docker.internal:5432"
|
||||
socat TCP-LISTEN:5432,bind=127.0.0.1,fork,reuseaddr \
|
||||
TCP:host.docker.internal:5432 &
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user