Documentation
PostgreSQL Setup Guide
Switch from SQLite to PostgreSQL for enhanced concurrency, advanced JSONB operations, and strict data integrity in enterprise deployments.
Docker Compose Blueprint
If you prefer PostgreSQL as your primary data store, we recommend utilizing the lightweight Alpine version to minimize your server's memory footprint while maintaining incredibly robust transactional guarantees.
postgres_db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password # Default password for Docker
POSTGRES_DB: nlink_db
# Optional: Expose port if you want to connect via external GUI tools
# ports:
# - "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:Connection Attributes
- Engine Version:
postgres:15-alpine
(Version 15+ introduces massive improvements to sorting and native JSON analytics, making it highly optimal for nLink data nodes). - Credentials:
postgres:password
(Like MySQL, ensure you change thePOSTGRES_PASSWORDwhen deploying to production). - Exposed Port:
5432
(The standard port mapped to allow secure attachments from pgAdmin or other database introspection tools).
Updating the System Target
If you choose to run PostgreSQL instead of the embedded SQLite, you must explicitly configure the nLink image to target it via environment variables:
nlink:
environment:
- DATABASE_DEFAULT=POSTGRES
- POSTGRES_HOST=postgres_db
- POSTGRES_PASSWORD=password