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.
| Template | What you get |
|---|---|
| PostgreSQL | PostgreSQL 17 with a volume and generated credentials. |
| MySQL | MySQL 8.4 LTS with a volume and an application user. |
| Redis | Redis 7.4 with a password, append-only persistence, and no eviction. |
| MongoDB | MongoDB 7.0 with authentication and a WiredTiger volume. |
| WordPress | WordPress with MySQL, persistent uploads and plugins, and a public URL. |
| n8n with workers | Queue-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:
| Template | Variables |
|---|---|
| PostgreSQL | DATABASE_URL, PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE |
| MySQL | DATABASE_URL, MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE |
| Redis | REDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD |
| MongoDB | MONGO_URL, MONGO_HOST, MONGO_PORT |
Copy the one your app needs into its variables.
Through the API
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.