Damp

PostgreSQL Database

Advanced open-source relational database

Advanced relational database using PostgreSQL 17 Alpine.

Docker Configuration

Image: postgres:17-alpine
Ports: 5432:5432
Volume: damp_pgsql_data:/var/lib/postgresql/data

DAMP identifies the service using Docker labels. Container name is auto-generated by Docker.

Port Configuration

Default ports: 5432 (host) → 5432 (container)

If port 5432 is occupied on the host machine, DAMP automatically uses the next available port. Check the DAMP interface to see the actual port assigned.

Environment Variables

VariableValueDescription
POSTGRES_PASSWORDpostgresSuperuser password
POSTGRES_DBdevelopmentDefault database
POSTGRES_USERpostgresSuperuser account

Connection Information

From Host Machine (Windows)

Connect from your Windows host to the PostgreSQL service.

psql -h localhost -p 5432 -U postgres -d development

Connection Details:

  • Host: localhost
  • Port: 5432 (or actual port shown in DAMP)
  • User: postgres
  • Password: postgres
  • Database: development

Connection String:

postgresql://postgres:postgres@localhost:5432/development

From Project Containers

Connect from your DevContainers or other Docker containers to the PostgreSQL service.

Use the container name or ID shown in the DAMP interface.

# Using container name from DAMP
psql -h [container-name] -U postgres -d development

Laravel .env Configuration:

DB_CONNECTION=pgsql
DB_HOST=[container-name]
DB_PORT=5432
DB_DATABASE=development
DB_USERNAME=postgres
DB_PASSWORD=postgres

Replace [container-name] with the actual container name displayed in DAMP.

Common Operations

Create New Database

psql -h localhost -U postgres

CREATE DATABASE my_app;

Import SQL Dump

# From host
psql -h localhost -U postgres development < dump.sql

# From project container (use container name from DAMP)
psql -h [container-name] -U postgres development < dump.sql

Backup Database

pg_dump -h localhost -U postgres development > backup.sql

Data Persistence

All databases are stored in the damp_pgsql_data Docker volume and persist across container restarts.

On this page