Skip to content

Commit

Permalink
Merge branch 'docker-hub' of 'git://github.com/andygrunwald/sortingha…
Browse files Browse the repository at this point in the history
…t.git'

Closes #63
Merges #63
  • Loading branch information
sduenas committed Jan 20, 2016
2 parents 9af066f + 649c744 commit 4b1eb72
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,17 @@ You are ready to use sortinghat!

### Docker

At first you need to build the image:
You can use our image from [DockerHub](https://hub.docker.com/r/metricsgrimoire/sortinghat/) (`metricsgrimoire/sortinghat`) and skip the `docker build` step.
If you prefer to build the image yourself execute:

```sh
$ docker build -t metricsgrimoire/sortinghat:latest .
$ docker build -t metricsgrimoire/sortinghat .
```

Next step would be to start a MySQL docker container for data storage:

```sh
$ docker run --name mysql \
-e MYSQL_USER=sortinghat \
-e MYSQL_PASSWORD=sortinghat \
-e MYSQL_ROOT_PASSWORD=sortinghat \
-d mysql
```
Expand All @@ -96,11 +95,22 @@ Run the sortinghat docker container in interactive mode:

```sh
$ docker run -i -t --rm \
--link mysql:mysql metricsgrimoire/sortinghat:latest \
--link mysql:mysql \
-e SORTINGHAT_DB_HOST=mysql \
-e SORTINGHAT_DB_PASSWORD=sortinghat \
-e SORTINGHAT_DB_DATABASE=sortinghat \
metricsgrimoire/sortinghat \
/bin/bash
```

You are ready to use sortinghat!
Now you can initialize sortinghat with the database name `sortinghat`:

```
$ sortinghat init sortinghat
```

You are ready to use sortinghat and explore the commands documented below.
Have fun!

## Configuration

Expand Down
4 changes: 2 additions & 2 deletions bin/sortinghat
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def create_common_arguments_parser(defaults):
help=argparse.SUPPRESS)
group.add_argument('-p', '--password', dest='password', default=os.getenv('SORTINGHAT_DB_PASSWORD', ''),
help=argparse.SUPPRESS)
group.add_argument('-d', '--database', dest=os.getenv('SORTINGHAT_DB_DATABASE', 'database'),
help=argparse.SUPPRESS)
group.add_argument('-d', '--database', dest='database', default=os.getenv('SORTINGHAT_DB_DATABASE', ''),
help=argparse.SUPPRESS)
group.add_argument('--host', dest='host', default=os.getenv('SORTINGHAT_DB_HOST', 'localhost'),
help=argparse.SUPPRESS)
group.add_argument('--port', dest='port', default=os.getenv('SORTINGHAT_DB_PORT', '3306'),
Expand Down

0 comments on commit 4b1eb72

Please sign in to comment.