Moved initial ci databases to specific docker-compose file

This commit is contained in:
Alejandro Celaya 2020-05-04 20:42:48 +02:00
parent dfdae96da5
commit f6d9a83202
2 changed files with 16 additions and 4 deletions

View File

@ -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)

14
docker-compose.ci.yml Normal file
View File

@ -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