Skip to content

Commit

Permalink
fix: working configuration of r2dbc connection pool (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal authored Sep 23, 2024
1 parent 60d9151 commit d015a09
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
image: stellio/stellio-search-service:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=${ENVIRONMENT}
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/${STELLIO_SEARCH_DB_DATABASE}
- SPRING_R2DBC_URL=r2dbc:pool:postgresql://postgres/${STELLIO_SEARCH_DB_DATABASE}
- SPRING_FLYWAY_URL=jdbc:postgresql://postgres/${STELLIO_SEARCH_DB_DATABASE}
- SPRING_R2DBC_USERNAME=${POSTGRES_USER}
- SPRING_R2DBC_PASSWORD=${POSTGRES_PASS}
Expand All @@ -73,7 +73,7 @@ services:
image: stellio/stellio-subscription-service:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=${ENVIRONMENT}
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/${STELLIO_SUBSCRIPTION_DB_DATABASE}
- SPRING_R2DBC_URL=r2dbc:pool:postgresql://postgres/${STELLIO_SUBSCRIPTION_DB_DATABASE}
- SPRING_FLYWAY_URL=jdbc:postgresql://postgres/${STELLIO_SUBSCRIPTION_DB_DATABASE}
- SPRING_R2DBC_USERNAME=${POSTGRES_USER}
- SPRING_R2DBC_PASSWORD=${POSTGRES_PASS}
Expand Down
1 change: 1 addition & 0 deletions search-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {

runtimeOnly("org.flywaydb:flyway-database-postgresql")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("io.r2dbc:r2dbc-pool")

testImplementation("org.testcontainers:postgresql")
testImplementation("org.testcontainers:kafka")
Expand Down
2 changes: 1 addition & 1 deletion search-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring.config.import=classpath:/shared.properties

spring.r2dbc.url=r2dbc:postgresql://localhost/stellio_search
spring.r2dbc.url=r2dbc:pool:postgresql://localhost/stellio_search
spring.r2dbc.username=stellio
spring.r2dbc.password=stellio_password

Expand Down
1 change: 1 addition & 0 deletions subscription-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {

runtimeOnly("org.flywaydb:flyway-database-postgresql")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("io.r2dbc:r2dbc-pool")

testImplementation("org.wiremock:wiremock-standalone:3.3.1")
testImplementation("org.testcontainers:postgresql")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
spring.config.import=classpath:/shared.properties
spring.r2dbc.url = r2dbc:postgresql://localhost/stellio_subscription

spring.r2dbc.url = r2dbc:pool:postgresql://localhost/stellio_subscription
spring.r2dbc.username = stellio
spring.r2dbc.password = stellio_password
# Required for Flyway to know where the DB is located
Expand Down

0 comments on commit d015a09

Please sign in to comment.