For production workloads, you might want to use cloud-managed database services. This guide explains how to integrate external databases with your Blossom applications.
Supported Cloud Providers
Common cloud database services include:
- Amazon RDS
- Amazon ElastiCache
- DigitalOcean Managed Databases
Setting Up External Databases
- Create your database in your chosen cloud provider
- Note the following connection details:
- Host/endpoint
- Port
- Database name
- Username
- Password
Connecting Your App: Environment Variables
Add your database credentials to your app’s environment variables:
- Go to your app’s settings
- Click “Environment Variables”
- Add the appropriate connection URL. Examples:
- For PostgreSQL:
DATABASE_URL=postgresql://user:pass@host:port/dbname
- For MySQL/MariaDB:
DATABASE_URL=mysql2://user:pass@host:port/dbname
- For Redis:
REDIS_URL=redis://host:port
- For Memcached:
MEMCACHED_URL=memcached://host:port
- For PostgreSQL: