Skip to content

Commit

Permalink
bind postgres and pgcat to localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed Jan 21, 2025
1 parent a193e7b commit b164587
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DB_USER=postgres
DB_DATABASE=postgres
DB_PASSWORD=postgres
DB_PORT=5432
DB_HOST=postgres
DB_HOST=localhost

# Mainnet
RPC_URLS="ws://caddy:8000"
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ services:
POSTGRES_HOST_AUTH_METHOD: md5
POSTGRES_INITDB_ARGS: --auth=md5
ports:
- "${DB_PORT}:5432"
- "127.0.0.1:${DB_PORT}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
Expand All @@ -103,7 +103,7 @@ services:
volumes:
- "./indexers/db/pgcat.toml:/etc/pgcat/pgcat.toml"
ports:
- "6432:6432"
- "127.0.0.1:6432:6432"
healthcheck:
test: ["CMD", "pgcat", "--version"]
interval: 10s
Expand All @@ -128,8 +128,8 @@ services:
restart: unless-stopped
environment:
# Essential Environment Variables
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@pgcat:6432/${DB_DATABASE}
HASURA_GRAPHQL_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@pgcat:6432/${DB_DATABASE} # Main database connection
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@localhost:6432/${DB_DATABASE}
HASURA_GRAPHQL_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@localhost:6432/${DB_DATABASE} # Main database connection
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} # Admin access secret
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET} # JWT authentication secret

Expand Down
2 changes: 1 addition & 1 deletion indexers/db/pgcat.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# General pooler settings
[general]
# What IP to run on, 0.0.0.0 means accessible from everywhere.
host = "0.0.0.0"
host = "127.0.0.1"

# Port to run on, same as PgBouncer used in this example.
port = 6432
Expand Down

0 comments on commit b164587

Please sign in to comment.