From f6d9a83202abbc5d3816fab8f0e19917cc506675 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 4 May 2020 20:42:48 +0200 Subject: [PATCH] Moved initial ci databases to specific docker-compose file --- .travis.yml | 6 ++---- docker-compose.ci.yml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 docker-compose.ci.yml diff --git a/.travis.yml b/.travis.yml index cb180c03..b9b8c6b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,10 +24,8 @@ install: - composer install --no-interaction --prefer-dist before_script: - - docker-compose up -d shlink_db shlink_db_postgres shlink_db_maria shlink_db_ms - - docker-compose exec shlink_db mysql -u root -proot -e "CREATE DATABASE shlink_test" - - docker-compose exec -e PGPASSWORD=root shlink_db_postgres psql -U postgres -c 'create database shlink_test;' - - docker-compose exec shlink_db_maria mysql -u root -proot -e "CREATE DATABASE shlink_test" + - docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_ms shlink_db shlink_db_postgres shlink_db_maria + - sleep 10 # Let MS database start-up before trying to interact with it - docker-compose exec shlink_db_ms /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Passw0rd!' -Q "CREATE DATABASE shlink_test;" - mkdir build - export DOCKERFILE_CHANGED=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/master} --name-only | grep Dockerfile) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml new file mode 100644 index 00000000..3783fef2 --- /dev/null +++ b/docker-compose.ci.yml @@ -0,0 +1,14 @@ +version: '3' + +services: + shlink_db: + environment: + MYSQL_DATABASE: shlink_test + + shlink_db_postgres: + environment: + POSTGRES_DB: shlink_test + + shlink_db_maria: + environment: + MYSQL_DATABASE: shlink_test