Simplify Makefile and docker usage (#24)

This commit is contained in:
Adrian Macneil 2018-01-22 21:49:12 -08:00 committed by GitHub
parent 2b8b849626
commit c2fc8b5441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 35 deletions

View file

@ -256,7 +256,7 @@ Alpine linux uses [musl libc](https://www.musl-libc.org/), which is incompatible
## Alternatives
Why another database schema migration tool? Dbmate was inspired by many other tools, primarily [Rails' ActiveRecord](http://guides.rubyonrails.org/active_record_migrations.html), with the goals of being trivial to configure, and language & framework independent. Here is a comparison between dbmate and other popular migration tools.
Why another database schema migration tool? Dbmate was inspired by many other tools, primarily [Active Record Migrations](http://guides.rubyonrails.org/active_record_migrations.html), with the goals of being trivial to configure, and language & framework independent. Here is a comparison between dbmate and other popular migration tools.
| | [goose](https://bitbucket.org/liamstask/goose/) | [sql-migrate](https://github.com/rubenv/sql-migrate) | [mattes/migrate](https://github.com/mattes/migrate) | [activerecord](http://guides.rubyonrails.org/active_record_migrations.html) | [sequelize](http://docs.sequelizejs.com/manual/tutorial/migrations.html) | [dbmate](https://github.com/amacneil/dbmate) |
| --- |:---:|:---:|:---:|:---:|:---:|:---:|
@ -282,22 +282,14 @@ Why another database schema migration tool? Dbmate was inspired by many other to
Dbmate is written in Go, pull requests are welcome.
Tests are run against a real database using docker-compose. First, install the [Docker Toolbox](https://www.docker.com/docker-toolbox).
Make sure you have docker running:
Tests are run against a real database using docker-compose. To build a docker image and run the tests:
```sh
$ docker-machine start default && eval "$(docker-machine env default)"
$ make docker
```
To build a docker image and run the tests:
To start a development shell:
```sh
$ make
```
To run just the lint and tests (without completely rebuilding the docker image):
```sh
$ make lint test
$ docker-compose run --rm dbmate bash
```