Database Services
One-click database provisioning for your applications.
Mist provides managed database services through pre-configured Docker templates, allowing you to quickly deploy databases without manual configuration.
Available Databases
PostgreSQL
- Latest PostgreSQL version
- Pre-configured with recommended settings
- Automatic environment variable setup
- Internal network access via
app-{appId}hostname - Template-driven CPU and memory limits
MySQL
- Latest MySQL version
- Optimized configuration
- User and password management via environment variables
- Internal network connectivity
MariaDB
- MySQL-compatible database
- Drop-in replacement for MySQL
- Same connection interface
Redis
- In-memory data store and cache
- Latest Redis version
- Password protection via environment variables
- Pub/sub and caching support
MongoDB
- Document-oriented database
- Latest MongoDB version
- User authentication support
- Internal DNS resolution
Creating a Database
- Navigate to your project
- Click "New Application"
- Select "Database" type
- Choose your database template:
- PostgreSQL
- MySQL
- MariaDB
- Redis
- MongoDB
- Enter instance name and description
- Configure environment variables (passwords, database names)
- Click "Create"
The database will be provisioned automatically with:
- Pre-configured port from template
- Recommended CPU and memory limits
- Default environment variables
- Connected to
traefik-netnetwork
Connecting to Databases
From Your Applications
Databases are accessible via internal hostname using the format app-{appId}:
Example Connection Strings:
# PostgreSQL
DATABASE_URL=postgresql://user:password@app-123:5432/myapp
# MySQL
DATABASE_URL=mysql://root:password@app-124:3306/myapp
# Redis
REDIS_URL=redis://:password@app-125:6379
# MongoDB
MONGODB_URI=mongodb://admin:password@app-126:27017/myappReplace app-{appId} with your actual database application ID shown in the dashboard.
Configuration via Environment Variables
Add connection details to your web/service application's environment variables:
- Go to your application's Environment tab
- Add database connection variables
- Use the database's container name (
app-{appId}) - Deploy your application
Database Management
Environment Variables
Configure your database through environment variables:
PostgreSQL:
POSTGRES_USER=myuser
POSTGRES_PASSWORD=mypassword
POSTGRES_DB=mydatabaseMySQL:
MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_DATABASE=mydatabase
MYSQL_USER=myuser
MYSQL_PASSWORD=mypasswordMongoDB:
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=passwordRedis:
REDIS_PASSWORD=yourpasswordResource Limits
Template-based defaults are applied:
- CPU: 1.0 cores (adjustable)
- Memory: 512MB (adjustable)
- Restart Policy: unless-stopped
You can modify these in the application settings.
Container Management
- Start/Stop: Control database lifecycle from dashboard
- Restart: Restart database containers
- Logs: View database logs in real-time
- Status: Monitor container state and uptime
Networking
All databases are connected to the traefik-net network:
- Internal DNS resolution
- Accessible by container name (
app-{appId}) - Isolated from public internet
- Secure inter-container communication
Best Practices
Security
- Strong Passwords: Use complex passwords for database users
- Environment Variables: Never hardcode credentials
- Least Privilege: Create database users with minimal required permissions
- Network Isolation: Databases are not exposed externally by default
Performance
- Resource Allocation: Monitor usage and adjust CPU/memory limits
- Connection Pooling: Use connection pools in your applications
- Indexing: Create appropriate indexes for query performance
- Monitoring: Check logs regularly for errors or warnings
Backup
Manual Backups Required
Automatic backup scheduling is not yet available. Manually backup your databases regularly using database-specific tools.
Backup Methods:
PostgreSQL:
docker exec app-{appId} pg_dump -U user dbname > backup.sqlMySQL:
docker exec app-{appId} mysqldump -u root -p dbname > backup.sqlMongoDB:
docker exec app-{appId} mongodump --out /backupComing Soon
- External Access - Public database access with security controls
- Management UIs - Built-in admin interfaces (pgAdmin, phpMyAdmin, Mongo Express, Redis Commander)
- Automated Backups - Scheduled backup and restore
- Connection Pooling - Optimize database connections
- Replication - High availability setups
- Multiple Versions - Choose specific database versions
- Volume Management - Persistent volume configuration
- Database Cloning - Duplicate databases for staging/testing
- Performance Metrics - Database-specific monitoring
- Auto-Configuration - Automatic environment variable injection to apps
Troubleshooting
Connection Refused
- Verify database container is running
- Check container logs for errors
- Ensure correct hostname format (
app-{appId}) - Verify port matches database default
Authentication Failed
- Check environment variables are set correctly
- Verify username and password
- Ensure database user has been created
- Check database logs for auth errors
Application Can't Connect
- Verify both containers are on
traefik-netnetwork - Check firewall rules aren't blocking internal traffic
- Test connection from application container logs
- Verify DNS resolution of container name
Related Documentation
- Applications - Application types and management
- Environment Variables - Managing configuration
- Service Templates - How templates work
