https://github.com/markelog/fastdev-psql
Quickly start Postgres DB with docker
https://github.com/markelog/fastdev-psql
docker postgresql psql
Last synced: 9 months ago
JSON representation
Quickly start Postgres DB with docker
- Host: GitHub
- URL: https://github.com/markelog/fastdev-psql
- Owner: markelog
- License: mit
- Created: 2016-03-09T09:06:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-11-20T14:09:11.000Z (over 7 years ago)
- Last Synced: 2025-08-09T06:07:39.206Z (11 months ago)
- Topics: docker, postgresql, psql
- Language: JavaScript
- Homepage:
- Size: 180 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Quickly start Postgres DB [](https://travis-ci.org/markelog/fastdev-psql) [](https://coveralls.io/github/markelog/fastdev-psql?branch=master)
## Use-case
You need to quickly spin postgres and you don't afraid to use docker.
## Usage
```js
import PSQL from 'fastdev-psql';
let psql = new PSQL({
name: 'test-psql', // Name of the container
port: 9999, // Host port
user: 'test-user', // Database user
password: 'test-pass', // Database password
db: 'test-db', // Database name
dump: `${__dirname}/dump.sql` // dump (optional)
});
psql.pump(); // Pump **all** info into stdout
psql.log(); // Show "pretty" output
psql.up().then(() => console.log('done and done'));
```