Managed Databases

Learn how to provision, configure, and connect managed databases on your servers with TurboV.


1. Supported Database Engines

TurboV provisions production-grade database instances directly on your connected servers using optimized official images:

Database EngineDocker ImageDefault PortStorage Volume PathHealthcheck Command
PostgreSQLpostgres:16-alpine5432/var/lib/postgresql/datapg_isready -U <user>
MySQLmysql:83306/var/lib/mysqlmysqladmin ping -u root -p<pass>
Redisredis:7-alpine6379/dataredis-cli ping
MongoDBmongo:727017/data/dbmongosh --eval 'db.adminCommand("ping")'

Every database container is attached to the dedicated turbov Docker bridge network, ensuring zero interference with host ports.


2. Provisioning a Database

To create a new database:

  1. In the dashboard, navigate to Databases → Add Database (or within a project, click New Database).
  2. Choose your database engine (PostgreSQL, MySQL, Redis, or MongoDB).
  3. Select the target server where the database should run.
  4. Give the database a name (e.g. primary-postgres) and specify an initial database name (e.g. production).
  5. Click Create Database.

What Happens Behind the Scenes

  • The agent creates a dedicated persistent Docker volume: vol_<database_id>.
  • The agent launches the database container with cryptographically random passwords generated by the control plane.
  • The agent monitors the health check until the database engine reports ready.
  • The control plane stores credentials encrypted with AES-256-GCM envelope encryption.

3. Internal Network Resolution vs External Access

By default, databases are not exposed to the public internet. Instead, they resolve privately over the Docker turbov bridge network:

[ Application Container: web ] ──(Private Bridge Network)──► [ db-postgres:5432 ]
  • Connection string format:
    postgres://postgres:SECURE_PASS@db-postgres:5432/production
    
  • No public ports are opened on the server firewall.
  • Latency between your application and database is near-zero ($\le 0.5\text$).

2. External Access (For Local Development or GUI Tools)

If you need to connect to your database from your local machine using tools like TablePlus, DBeaver, or pgAdmin:

  1. Open your database in the dashboard and select Settings → External Access.
  2. Toggle Enable External Port.
  3. TurboV opens a dedicated high-range external port (or routes via Traefik TCP proxy with TLS).
  4. Copy the public connection string displayed in the dashboard.

4. Linking Databases to Applications

TurboV eliminates manually copying and pasting connection strings:

  1. Open your application environment settings.
  2. Under Linked Databases, select your database instance.
  3. TurboV automatically injects the appropriate environment variables:
    • For PostgreSQL: DATABASE_URL, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB, POSTGRES_HOST, POSTGRES_PORT.
    • For Redis: REDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD.
    • For MySQL: DATABASE_URL, MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE.
    • For MongoDB: MONGODB_URI, MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD.

If you update database credentials or clone a database, linked applications are automatically updated.


5. Next Steps