2022-12-27 16:59:04 +01:00
|
|
|
version: '2'
|
|
|
|
services:
|
|
|
|
test-db:
|
2023-02-20 18:08:10 +01:00
|
|
|
platform: linux/x86_64
|
2022-12-27 16:59:04 +01:00
|
|
|
image: mysql:5.7
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: activitypub-test
|
|
|
|
MYSQL_ROOT_PASSWORD: activitypub-test
|
2023-06-16 11:40:26 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:3306"]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 2s
|
|
|
|
retries: 5
|
2022-12-27 16:59:04 +01:00
|
|
|
|
|
|
|
test-php:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
2023-06-16 11:40:26 +02:00
|
|
|
depends_on:
|
|
|
|
test-db:
|
|
|
|
condition: service_healthy
|
2022-12-27 16:59:04 +01:00
|
|
|
links:
|
|
|
|
- test-db
|
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
command: ["composer", "run-script", "test"]
|