Guide

Build and deploy

Templates and databases

Templates add ready-made services to an environment in one step: a database with a volume and generated credentials, or a complete app with its database.

Add a template

On the canvas, choose Add, then Database or Template. Mesh stages every service, volume, and public domain of the template, then you release the environment as usual.

TemplateWhat you get
PostgreSQLPostgreSQL 17 with a volume and generated credentials.
MySQLMySQL 8.4 LTS with a volume and an application user.
RedisRedis 7.4 with a password, append-only persistence, and no eviction.
MongoDBMongoDB 7.0 with authentication and a WiredTiger volume.
WordPressWordPress with MySQL, persistent uploads and plugins, and a public URL.
n8n with workersQueue-mode n8n: a primary, a worker with its task runner, PostgreSQL, and Redis.

Databases

Database templates run official Docker images with a volume and a TCP health check. They are reachable only on the environment's private network, at the service's internal hostname.

Each database service carries its connection variables, with a generated password:

TemplateVariables
PostgreSQLDATABASE_URL, PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE
MySQLDATABASE_URL, MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE
RedisREDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD
MongoDBMONGO_URL, MONGO_HOST, MONGO_PORT

Copy the one your app needs into its variables.

Through the API

Terminal
curl https://mesh.example.com/v1/templates?database_only=true \
  -H "Authorization: Bearer $MESH_TOKEN"

curl -X POST https://mesh.example.com/v1/environments/$ENVIRONMENT_ID/templates \
  -H "Authorization: Bearer $MESH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"template_id": "postgres"}'

The second call stages the template atomically. Release the environment to deploy it.