Skip to content

Commit

Permalink
docs(readme): add instructions on how to used the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
danvergara committed Jul 27, 2021
1 parent 409f3d3 commit ce9ac12
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ $ go get github.com/danvergara/seeder

## Help



```
Seeder is a ClI tool and Golang library that helps to
seeds databases using golang code. ORM or SQL driver agnostic.
Expand Down Expand Up @@ -224,6 +222,18 @@ You can skip the --path flag is yout main is located at `db/main.go`. The recomm
   └── users.go
```

### Docker Usage

```sh
$ docker run -v "$(pwd):/seeder" seeder --path path/to/main.go
```

If you neeed set to up environment variables to connect with the database:

```sh
$ docker run -v "$(pwd):/seeder" --network host -e DB_HOST='localhost' -e DB_USER='postgres' -e DB_PASSWORD='password' -e DB_NAME='users' -e DB_PORT='5432' -e DB_DRIVER='postgres' seeder --path path/to/main.go
```

## Contribute

- Fork this repository
Expand Down

0 comments on commit ce9ac12

Please sign in to comment.