mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-22 01:35:24 -04:00
4b75eed6b7
* feat: add support for PgBouncer in database initialization * refactor: consolidate gorm configuration for database connection * Add MySQL and multi-driver DB integration tests (#535) * feat: streamline integration tests by using a centralized docker-compose file * fix: add timeout * refactor: replace inline service definitions with docker-compose action for integration tests * fix: update pgbouncer image and environment variable names for consistency
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
services:
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: ["redis-server", "--requirepass", "difyai123456"]
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "difyai123456", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 30
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: difyai123456
|
|
POSTGRES_DB: dify_plugin_daemon
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d dify_plugin_daemon"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 30
|
|
|
|
mysql:
|
|
image: mysql:8
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: difyai123456
|
|
MYSQL_DATABASE: dify_plugin_daemon
|
|
ports:
|
|
- "3306:3306"
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD",
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 15
|
|
|
|
pgbouncer:
|
|
image: ghcr.io/starttoaster/pgbouncer:latest
|
|
environment:
|
|
PGBOUNCER_DB_HOST: postgres
|
|
PGBOUNCER_DB_PORT: 5432
|
|
PGBOUNCER_DB_USER: postgres
|
|
PGBOUNCER_DB_PASSWORD: difyai123456
|
|
PGBOUNCER_DB_NAME: dify_plugin_daemon
|
|
PGBOUNCER_POOL_MODE: transaction
|
|
PGBOUNCER_MAX_CLIENT_CONN: 100
|
|
PGBOUNCER_DEFAULT_POOL_SIZE: 20
|
|
ports:
|
|
- "6432:6432"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
# healthcheck:
|
|
# test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 6432 -U postgres -d dify_plugin_daemon"]
|
|
# interval: 5s
|
|
# timeout: 3s
|
|
# retries: 30
|