phpvms/compose.test.yml
2026-06-02 15:40:01 -05:00

40 lines
1.1 KiB
YAML

name: phpvms-test
services:
mysql:
image: mysql:8.4
ports:
- "13306:3306"
environment:
MYSQL_DATABASE: testing
MYSQL_ROOT_PASSWORD: password
volumes:
- mysql-data:/var/lib/mysql
- ./vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh:ro
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--password=password"]
retries: 5
timeout: 5s
start_period: 15s
pgsql:
image: postgres:18-alpine
ports:
- "15432:5432"
environment:
POSTGRES_DB: testing
POSTGRES_USER: phpvms
POSTGRES_PASSWORD: password
volumes:
- pgsql-data:/var/lib/postgresql
- ./vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql:ro
- ./resources/docker/pgsql/01-test-user.sql:/docker-entrypoint-initdb.d/01-test_user.sql:ro
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "testing", "-U", "phpvms"]
retries: 3
timeout: 5s
start_period: 10s
volumes:
mysql-data:
pgsql-data: