Database Templates
The database category includes 5 production-ready database templates with persistent storage, health checks, and secure defaults.
Template List
| Template | Description | Default Port | Min RAM | Security |
|---|---|---|---|---|
| PostgreSQL | Advanced open-source relational database | 5432 | 256 MB | secure |
| MySQL | Popular open-source relational database | 3306 | 512 MB | secure |
| MariaDB | MySQL-compatible community fork | 3306 | 512 MB | secure |
| MongoDB | Document-oriented NoSQL database | 27017 | 512 MB | secure |
| Redis | In-memory key-value store and cache | 6379 | 128 MB | secure |
Common Configuration
All database templates include:
- Persistent volumes for data storage (survives container restarts)
- Health checks using database-native commands (
pg_isready,mysqladmin ping, etc.) - Auto-generated passwords — secure random passwords created at deploy time
- No exposed ports — databases are accessible only within the Docker network
Variables
| Variable | Type | Description |
|---|---|---|
SERVICE_NAME | string | Service identifier (required) |
DB_NAME | string | Initial database name |
DB_USER | string | Database admin username |
DB_PASSWORD | password | Database admin password (auto-generated if empty) |
PostgreSQL
Image: postgres:16
The default database for AI Admin Panel itself. Configured with:
- WAL archiving support
pg_stat_statementsextension enabled- Tuned
shared_buffersandwork_memfor the allocated memory - Automatic vacuum configuration
MySQL
Image: mysql:8.4
Configured with:
- InnoDB as the default storage engine
utf8mb4character set andutf8mb4_unicode_cicollation- Binary logging enabled for point-in-time recovery
- Secure default authentication (
caching_sha2_password)
MariaDB
Image: mariadb:11
MySQL-compatible with additional features:
- Aria storage engine for crash-safe temporary tables
- Thread pool for better concurrent connection handling
utf8mb4character set by default
MongoDB
Image: mongo:7
Document database configured with:
- Authentication enabled by default
- WiredTiger storage engine
- Journal enabled for crash recovery
- Initial database and user created from variables
Redis
Image: redis:7
In-memory store configured with:
appendonly yesfor persistencemaxmemory-policy allkeys-lruto handle memory limits- Password authentication required
- RDB snapshots every 60 seconds
Connecting to Databases
Databases deployed through the panel are accessible to other services on the same Docker network. Use the service name as the hostname:
# From another service on the same panel
postgresql://db_user:db_pass@my-postgres:5432/mydb
mysql://db_user:db_pass@my-mysql:3306/mydb
mongodb://db_user:db_pass@my-mongo:27017/mydb
redis://:password@my-redis:6379
For external access, databases intentionally do not expose ports. If you need external access, deploy a connection proxy or use the panel's API to stream queries.
Backup Integration
Database templates work with the panel's backup system. Backups use database-native dump tools:
- PostgreSQL:
pg_dump - MySQL/MariaDB:
mysqldump - MongoDB:
mongodump - Redis: RDB snapshot copy