develop (#45)
Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl> Reviewed-on: #45
This commit is contained in:
70
testing.compose.yml
Normal file
70
testing.compose.yml
Normal file
@ -0,0 +1,70 @@
|
||||
services:
|
||||
testing:
|
||||
profiles:
|
||||
- testing
|
||||
build: .
|
||||
container_name: incoviba_tests
|
||||
env_file:
|
||||
- ${APP_PATH:-.}/.test.env
|
||||
- ./.key.env
|
||||
volumes:
|
||||
- ${APP_PATH:-.}/:/code
|
||||
- ./logs/test:/logs
|
||||
command: [ '/code/bin/phpunit-watcher', 'watch' ]
|
||||
networks:
|
||||
- testing
|
||||
depends_on:
|
||||
test-db:
|
||||
condition: service_healthy
|
||||
test-redis:
|
||||
condition: service_healthy
|
||||
test-mqtt:
|
||||
condition: service_started
|
||||
|
||||
test-db:
|
||||
profiles:
|
||||
- testing
|
||||
image: mariadb:latest
|
||||
container_name: incoviba_test_db
|
||||
env_file: ${APP_PATH:-.}/.test.db.env
|
||||
volumes:
|
||||
- test-db:/var/lib/mysql}
|
||||
healthcheck:
|
||||
test: [ "CMD", "mariadb-admin", "ping", "-h", "localhost" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
networks:
|
||||
- testing
|
||||
|
||||
test-redis:
|
||||
profiles:
|
||||
- testing
|
||||
image: redis:latest
|
||||
container_name: incoviba_test_redis
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- testing
|
||||
|
||||
test-mqtt:
|
||||
profiles:
|
||||
- testing
|
||||
image: maateen/docker-beanstalkd
|
||||
container_name: incoviba_test_mqtt
|
||||
healthcheck:
|
||||
test: [ "CMD", "nc", "-z", "localhost", "11300" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- testing
|
||||
|
||||
volumes:
|
||||
test-db: {}
|
||||
|
||||
networks:
|
||||
testing: {}
|
Reference in New Issue
Block a user