Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmatic committed May 8, 2023
1 parent 8a4992b commit 8bf2d2a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,36 @@ Documentation for each subcommand:

Using Docker links to `postgres` container. This will display the usage information:

```docker run --rm -i -t --link myserver:postgres docker.io/panubo/postgres-toolbox```
```console
docker run --rm -i -t --link myserver:postgres docker.io/panubo/postgres-toolbox
```

To run the subcommand:

```docker run --rm -i -t --link myserver:postgres docker.io/panubo/postgres-toolbox <subcommand>```
```console
docker run --rm -i -t --link myserver:postgres docker.io/panubo/postgres-toolbox <subcommand>
```

## Configuration

Use `--link <postgres container name>:postgres` to automatically specify the required variables.

Or alternatively specify the environment variables:

- `DATABASE_HOST` = IP / hostname of PostgreSQL server.
- `DATABASE_PORT` = TCP Port of PostgreSQL service.
- `DATABASE_USER` = Administrative user eg postgres with SUPERUSER privileges.
- `DATABASE_PASS` = Password of administrative user.
| Name | Description |
| --- | --- |
| `DATABASE_HOST` | IP / hostname of PostgreSQL server. |
| `DATABASE_PORT` | TCP Port of PostgreSQL service. |
| `DATABASE_USER` | Administrative user eg postgres with SUPERUSER privileges. |
| `DATABASE_PASS` | Password of administrative user. |

Some subcommands require additional environment parameters.

## Testing

[bats](https://bats-core.readthedocs.io/en/stable/index.html) is used for testing. To test the image and commands bats and docker are required. Use the following commands to run all of the tests.

```
```console
make build-with-cache # or make build
make test
```
Expand Down

0 comments on commit 8bf2d2a

Please sign in to comment.