Skip to content

Commit

Permalink
Add build test cases with pgbouncer (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsihk authored Nov 15, 2024
1 parent 2222e39 commit 8e5e064
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.5'
services:
app:
image: ${TEST_IMAGE_NAME:-jimsihk/alpine-moodle:local}
Expand All @@ -11,17 +10,41 @@ services:
- SESSION_CACHE_PORT=6379
- AUTO_UPDATE_MOODLE=false
- UPDATE_MOODLE_CODE=false
- DB_TYPE=pgsql
- DB_HOST=pgbouncer
- DB_PORT=6432
- DB_NAME=moodle
- DB_USER=moodledbuser
- DB_PASS=moodledbpass
- DB_DBHANDLEOPTIONS=true
- DB_FETCHBUFFERSIZE=0
depends_on:
- postgres
- redis
- pgbouncer

postgres:
image: postgres:alpine
image: postgres:latest
environment:
- POSTGRES_PASSWORD=moodle
- POSTGRES_USER=moodle
- POSTGRES_PASSWORD=moodledbpass
- POSTGRES_USER=moodledbuser
- POSTGRES_DB=moodle


pgbouncer:
image: bitnami/pgbouncer:latest
environment:
- POSTGRESQL_USERNAME=moodledbuser
- POSTGRESQL_PASSWORD=moodledbpass
- POSTGRESQL_HOST=postgres
- PGBOUNCER_DATABASE=moodle
- PGBOUNCER_AUTH_TYPE=scram-sha-256
- PGBOUNCER_POOL_MODE=session
#- ADMIN_USERS=moodledbuser
- PGBOUNCER_IGNORE_STARTUP_PARAMETERS=options,extra_float_digits
#- PGBOUNCER_PORT=5432
depends_on:
- postgres

redis:
image: redis/redis-stack-server

Expand Down

0 comments on commit 8e5e064

Please sign in to comment.