A lightweight utility for spinning up a pre-configured PostgreSQL instance in Docker, ideal for local development and CI. Version 1.3.0 requires Node >=20.17.0. Automatically configures user, password, and database with minimal setup. Differentiates from manual Docker commands by handling container lifecycle and network cleanup.
npm install s-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to start a Postgres Docker container with custom credentials, get connection URI, and stop the container.
Upgrade Node.js to >=20.17.0.
Ensure Docker daemon is running and user is in the docker group (or use sudo).
Set host in config to '0.0.0.0' to bind to all interfaces.
Explicitly set imageTag to a specific version like '16-alpine'.
Start Docker and ensure /var/run/docker.sock exists and is writable.
Install package: npm install s-postgres. If using CommonJS, switch to dynamic import: const postgres = await import('s-postgres').Run postgres.stop(container) after use or remove existing container manually: docker rm -f s-postgres