version: '3.8'
services:
postgres:
image: postgres:15
container_name: sqlx-mcp-postgres
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
ports:
- "15432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./sql/init-postgres.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 10s
timeout: 5s
retries: 5
mysql:
image: mysql:8.0
container_name: sqlx-mcp-mysql
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: testdb
MYSQL_USER: testuser
MYSQL_PASSWORD: testpass
ports:
- "13306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./sql/init-mysql.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "testuser", "-ptestpass"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
mysql_data: