Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and docker-compose.yml to easily run tests on all data…
…bases
- Loading branch information
1 parent
1e83010
commit 3185a53
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM golang:1.12.4 | ||
|
||
WORKDIR /gormigrate | ||
COPY . . | ||
|
||
RUN go mod download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: '3' | ||
|
||
services: | ||
gormigrate: | ||
image: gormigrate | ||
depends_on: | ||
- postgresql | ||
- mysql | ||
- sqlserver | ||
environment: | ||
PGPASSWORD: postgres | ||
PG_CONN_STRING: host=postgresql user=postgres dbname=gormigrate_test port=5432 sslmode=disable | ||
|
||
MYSQL_CONN_STRING: root:mysql@tcp(mysql)/gormigrate_test?multiStatements=true | ||
|
||
SQLSERVER_CONN_STRING: server=sqlserver;database=master;user id=sa;password=SQL@1server;encrypt=disable | ||
|
||
postgresql: | ||
image: postgres:11.2 | ||
environment: | ||
POSTGRES_DB: gormigrate_test | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
|
||
mysql: | ||
image: mysql:5.7 | ||
environment: | ||
MYSQL_DATABASE: gormigrate_test | ||
MYSQL_ROOT_PASSWORD: mysql | ||
|
||
sqlserver: | ||
image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu | ||
environment: | ||
ACCEPT_EULA: 'Y' | ||
SA_PASSWORD: SQL@1server |