- Notifications
You must be signed in to change notification settings - Fork2
PostgreSQL Toolbox for Docker
License
panubo/docker-postgres-toolbox
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A collection of PostgreSQL scripts for automating common DBA tasks in a Docker-centric way.
Documentation for each subcommand:
Using Docker links topostgres container. This will display the usage information:
docker run --rm -i -t --link myserver:postgres docker.io/panubo/postgres-toolboxTo run the subcommand:
docker run --rm -i -t --link myserver:postgres docker.io/panubo/postgres-toolbox <subcommand>Use--link <postgres container name>:postgres to automatically specify the required variables.
Or alternatively specify the environment variables:
| Name | Description |
|---|---|
DATABASE_HOST | IP / hostname of PostgreSQL server. |
DATABASE_PORT | TCP Port of PostgreSQL service. |
DATABASE_USERNAME | Administrative user eg postgres with SUPERUSER privileges. |
DATABASE_PASSWORD | Password of administrative user. |
Some subcommands require additional environment parameters.
bats 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.
make build-with-cache # or make buildmake test
All tests are kept intests/ and all of the extension.bats.test_functions.bash is also loaded by each test. The functions include a setup and teardown (see bats docs) which creates and destroys a postgres target server.
Using bats setup and teardown and avoiding exposing postgres ports etc should allow tests to be run in parallel.
Feature incomplete. Work in progress.
Example- Create user
docker run --rm -i -t -e DATABASE_HOST=localhost -e DATABASE_USERNAME=postgres -e DATABASE_PASSWORD=mysecretpassword -e DATABASE_PORT=5432 --network=host docker.io/panubo/postgres-toolbox create-user-db test test
About
PostgreSQL Toolbox for Docker
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.