changed building testing environment to docker-compose

This commit is contained in:
Kononnable 2017-08-14 19:46:09 +02:00
parent 694025ceca
commit 79044666c4
2 changed files with 41 additions and 14 deletions

View File

@ -13,22 +13,10 @@ services:
- docker
env:
- MSSQL_Skip=0 MSSQL_Host=localhost MSSQL_Port=1433 MSSQL_Username=sa MSSQL_Password=!Passw0rd MSSQL_Database=typeorm_mg
- POSTGRES_Skip=0 POSTGRES_Host=localhost POSTGRES_Port=5432 POSTGRES_Username=postgres POSTGRES_Password=!Passw0rd POSTGRES_Database=typeorm_mg
- MYSQL_Skip=0 MYSQL_Host=localhost MYSQL_Port=3306 MYSQL_Username=root MYSQL_Password=!Passw0rd MYSQL_Database=typeorm_mg
- MARIADB_Skip=0 MARIADB_Host=localhost MARIADB_Port=3307 MARIADB_Username=root MARIADB_Password=!Passw0rd MARIADB_Database=typeorm_mg
- MSSQL_Skip=0 MSSQL_Host=localhost MSSQL_Port=1433 MSSQL_Username=sa MSSQL_Password=!Passw0rd MSSQL_Database=typeorm_mg POSTGRES_Skip=0 POSTGRES_Host=localhost POSTGRES_Port=5432 POSTGRES_Username=postgres POSTGRES_Password=!Passw0rd POSTGRES_Database=typeorm_mg MYSQL_Skip=0 MYSQL_Host=localhost MYSQL_Port=3306 MYSQL_Username=root MYSQL_Password=!Passw0rd MYSQL_Database=typeorm_mg MARIADB_Skip=0 MARIADB_Host=localhost MARIADB_Port=3307 MARIADB_Username=root MARIADB_Password=!Passw0rd MARIADB_Database=typeorm_mg
before_install:
- sudo service mysql stop
- sudo service postgresql stop
- docker pull microsoft/mssql-server-linux
- docker pull postgres
- docker pull mysql
- docker pull mariadb
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=!Passw0rd' -p 1433:1433 --name mssql -d microsoft/mssql-server-linux
- docker run -e 'POSTGRES_PASSWORD=!Passw0rd' -p 5432:5432 --name postgres -d postgres
- docker run -e MYSQL_ROOT_PASSWORD=!Passw0rd -p 3306:3306 --name mysql -d mysql
- docker run -e MYSQL_ROOT_PASSWORD=!Passw0rd -p 3307:3306 --name mariadb -d mariadb
- docker-compose up -d
before_script:

39
docker-compose.yml Normal file
View File

@ -0,0 +1,39 @@
version: '2'
services:
# mysql
mysql:
image: "mysql:5.7.10"
container_name: "typeorm-mysql"
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "!Passw0rd"
# mariadb
mariadb:
image: "mariadb:10.1.16"
container_name: "typeorm-mariadb"
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: "!Passw0rd"
# postgres
postgres:
image: "postgres:9.6.1"
container_name: "typeorm-postgres"
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: "!Passw0rd"
# mssql
mssql:
image: "microsoft/mssql-server-linux"
container_name: "typeorm-mssql"
ports:
- "1433:1433"
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "!Passw0rd"