Fix pgbouncer port and activate DB split
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 7m29s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 7m29s
edoburu/pgbouncer listens on 5432, not 6432. Update all DATABASE_URL entries to use pgbouncer:5432. Activate per-app DATABASE_URL split (no longer commented out). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,8 @@ x-app-common: &app-common
|
||||
- /root/rose-ash/_config/app-config.yaml:/app/config/app-config.yaml:ro
|
||||
|
||||
x-app-env: &app-env
|
||||
DATABASE_URL_ACCOUNT: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_account
|
||||
DATABASE_URL_FEDERATION: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_federation
|
||||
DATABASE_URL_ACCOUNT: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_account
|
||||
DATABASE_URL_FEDERATION: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_federation
|
||||
SMTP_HOST: ${SMTP_HOST}
|
||||
SMTP_PORT: ${SMTP_PORT}
|
||||
MAIL_FROM: ${MAIL_FROM}
|
||||
@@ -56,7 +56,7 @@ services:
|
||||
dockerfile: blog/Dockerfile
|
||||
environment:
|
||||
<<: *app-env
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_blog
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_blog
|
||||
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_blog
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
DATABASE_HOST: db
|
||||
@@ -74,7 +74,7 @@ services:
|
||||
- /root/rose-ash/_snapshot:/app/_snapshot
|
||||
environment:
|
||||
<<: *app-env
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_market
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_market
|
||||
REDIS_URL: redis://redis:6379/1
|
||||
DATABASE_HOST: db
|
||||
DATABASE_PORT: "5432"
|
||||
@@ -87,7 +87,7 @@ services:
|
||||
dockerfile: cart/Dockerfile
|
||||
environment:
|
||||
<<: *app-env
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_cart
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_cart
|
||||
REDIS_URL: redis://redis:6379/2
|
||||
DATABASE_HOST: db
|
||||
DATABASE_PORT: "5432"
|
||||
@@ -100,7 +100,7 @@ services:
|
||||
dockerfile: events/Dockerfile
|
||||
environment:
|
||||
<<: *app-env
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_events
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_events
|
||||
REDIS_URL: redis://redis:6379/3
|
||||
DATABASE_HOST: db
|
||||
DATABASE_PORT: "5432"
|
||||
@@ -113,7 +113,7 @@ services:
|
||||
dockerfile: federation/Dockerfile
|
||||
environment:
|
||||
<<: *app-env
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_federation
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_federation
|
||||
REDIS_URL: redis://redis:6379/4
|
||||
DATABASE_HOST: db
|
||||
DATABASE_PORT: "5432"
|
||||
@@ -126,7 +126,7 @@ services:
|
||||
dockerfile: account/Dockerfile
|
||||
environment:
|
||||
<<: *app-env
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:6432/db_account
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_account
|
||||
REDIS_URL: redis://redis:6379/5
|
||||
DATABASE_HOST: db
|
||||
DATABASE_PORT: "5432"
|
||||
@@ -151,17 +151,17 @@ services:
|
||||
- node.labels.gpu != true
|
||||
|
||||
pgbouncer:
|
||||
image: bitnami/pgbouncer:latest
|
||||
image: edoburu/pgbouncer:latest
|
||||
environment:
|
||||
POSTGRESQL_HOST: db
|
||||
POSTGRESQL_PORT: "5432"
|
||||
POSTGRESQL_USERNAME: ${POSTGRES_USER:-postgres}
|
||||
POSTGRESQL_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
|
||||
POSTGRESQL_DATABASE: "*"
|
||||
PGBOUNCER_POOL_MODE: transaction
|
||||
PGBOUNCER_DEFAULT_POOL_SIZE: "20"
|
||||
PGBOUNCER_MAX_CLIENT_CONN: "300"
|
||||
PGBOUNCER_MIN_POOL_SIZE: "5"
|
||||
DB_HOST: db
|
||||
DB_PORT: "5432"
|
||||
DB_USER: ${POSTGRES_USER:-postgres}
|
||||
DB_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
|
||||
POOL_MODE: transaction
|
||||
DEFAULT_POOL_SIZE: "20"
|
||||
MAX_CLIENT_CONN: "300"
|
||||
MIN_POOL_SIZE: "5"
|
||||
AUTH_TYPE: plain
|
||||
networks:
|
||||
appnet:
|
||||
deploy:
|
||||
|
||||
Reference in New Issue
Block a user