2.20.0 • Published 6 months ago

pglaunch v2.20.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

pglaunch - PostgreSQL Database Launcher

pglaunch is a simple script to launch a PostgreSQL docker container. It can be used to quickly launch a PostgreSQL database for testing or development purposes.

Options are available to keep the container running after the script exits and to specify the name and port of the container.

pglaunch [options]

Options:
  -h, --help           show this help message
  -v, --version        show version number
  -k, --keep           keep postgres container after restart or exit
  -n, --name <name>    name for docker container
                       (default: current directory name)
  -p, --port <port>    port for postgres container
                       (default: 5555)

Star this project on GitHub if you find it useful.

Installation

npx pglaunch

Other package managers are also supported.

Current implemented for bash/zsh shell.

Examples

  1. Launch a PostgreSQL container with the default name and port:
pglaunch

POSTGRES_URL=postgresql://postgres:895UhteoUadR@localhost:5555/postgres

  1. Launch a PostgreSQL container with a custom name and port:
pglaunch -n awesome-project -p 5432 && docker ps --format "table {{.Names}}"

POSTGRES_URL=postgresql://postgres:895UhteoUadR@localhost:5432/postgresNAMESawesome-project-y6zT

  1. Launch a PostgreSQL container and keep it running after the script exits:
pglaunch -k

POSTGRES_URL=postgresql://postgres:895UhteoUadR@localhost:5555/postgres

  1. Launch a PostgreSQL container with a custom name and port and keep it running after the script exits:
pglaunch -n awesome-project -p 5432 -k && docker ps --format "table {{.Names}}"

POSTGRES_URL=postgresql://postgres:895UhteoUadR@localhost:5432/postgresNAMESawesome-project-y6zT

License

MIT

2.20.0

6 months ago

2.19.0

6 months ago

2.18.0

6 months ago

2.17.0

6 months ago

2.16.0

6 months ago

2.13.0

6 months ago

2.12.0

6 months ago

2.11.0

6 months ago

2.9.0

6 months ago

2.8.0

6 months ago

2.7.0

6 months ago

2.6.0

6 months ago

2.5.0

6 months ago

2.4.0

6 months ago

2.3.0

6 months ago

2.2.0

6 months ago

1.1.0

6 months ago

0.0.3

6 months ago

0.0.1

6 months ago