For development against multiple databases and database versions. Run, manage, and orchestrate everything with docker.
I work on the open source project SwitchQL and we need to develop and test against multiple database providers and versions. This project makes it easier to work on SwitchQL.
- Install node & npm & Docker
- Run
npm install
- Run
npm start
to deploy Docker containers.
- Run
npm stop
to stop them.
- MySQL -
npm run connect:mysql
- Postgres -
npm run connect:postgres
- MsSQL -
npm run connect:mssql
The two scripts createTables.sql
and insertData.sql
are placed into the docker-entrypoint-initdb.d
directory, which runs the scripts on startup.
The two scripts createTables.sql
and insertData.sql
are placed into the docker-entrypoint-initdb.d
directory, which runs the scripts on startup.
The two scripts createTables.sql
and insertData.sql
are placed into the docker-entrypoint-initdb.d
directory, which does not exist natively.
The CLI tool sqlcmd
is used to run the scripts 10 seconds after the container starts up throught the npm script poststart
.