PostgreSQL 18 with pg_partman for high-throughput delivery. Optimized for ThorMail.
397
This image is based on the official postgres:18-alpine and pre-configured with the pg_partman extension and optimized settings for high-throughput delivery processing.
We have chosen PostgreSQL 18 for this project to leverage its advanced high-performance features, which are critical for a high-volume delivery system like ThorMail:
COPY FROM: Significantly speeds up bulk data ingestion, which represents a massive performance boost when importing large contact lists or logs.VACUUM: Crucial for our queue system. The new lazy pruning and internal improvements reduce the overhead of cleaning up dead tuples in our highly transactional tables.Pull the image from Docker Hub and run:
docker pull thormail/postgres-thormail:latest
docker run -d \
--name thormail-postgres \
-e POSTGRES_PASSWORD=mysecretpassword \
-e POSTGRES_DB=thormail_db \
-p 5432:5432 \
-v postgres_data:/var/lib/postgresql/data \
thormail/postgres-thormail:latest
version: '3.8'
services:
db:
image: thormail/postgres-thormail:latest
environment:
- POSTGRES_USER=thormail
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=thormail_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 30s
timeout: 5s
retries: 3
volumes:
postgres_data:
| Feature | Description |
|---|---|
| pg_partman 5.2.0 | Automatic table partitioning for time-series data |
| Health Check | Built-in container health monitoring |
| Optimized Config | Tuned for high-throughput delivery workloads |
| Alpine-based | Minimal image size (~108MB) |
To persist your database data (delivery logs, users, etc.) across container restarts, mount a volume to /var/lib/postgresql/data.
Example:
-v /my/local/data:/var/lib/postgresql/data
This image inherits all functionality from the official Postgres Docker image. You can use standard environment variables for initialization:
| Variable | Required | Description |
|---|---|---|
POSTGRES_PASSWORD | ✅ Yes | Sets the superuser password |
POSTGRES_USER | No | Superuser name (default: postgres) |
POSTGRES_DB | No | Default database (recommended: thormail_db) |
PGDATA | No | Data directory (default: /var/lib/postgresql/data) |
The image comes with a custom postgresql.conf located at /etc/postgresql/postgresql.conf which is optimized for:
To override settings, you can mount your own config or pass arguments via command line, but it is recommended to use the provided configuration as a baseline.
For documentation, support, and more details about the ThorMail ecosystem, visit thormail.io.
This image is based on the official PostgreSQL Docker image and pg_partman, both licensed under the PostgreSQL License.
Content type
Image
Digest
sha256:8a9efa808…
Size
107.9 MB
Last updated
2 months ago
docker pull thormail/postgres-thormail