Overview
This template provides a production‑ready Microsoft SQL Server instance as a Monk runnable. You can:- Run it directly to get a managed SQL Server container with sensible defaults
- Inherit it in your own runnable to seamlessly add a relational database to your stack
What this template manages
- SQL Server container (
mcr.microsoft.com/mssql/serverimage, configurable tag) - Network service on port 1433
- Persistent volumes for data storage
- SA authentication and EULA acceptance
Quick start (run directly)
- Load templates
- Run SQL Server with defaults
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesinmssql.yml, thenmonk load MANIFESTand run.
localhost:1433 (or the runnable hostname inside Monk networks) using the configured SA credentials.
Configuration
Key variables you can customize in this template:P@ssw0rd. Always change this in production environments.
Data is persisted under ${monk-volume-path}/mssql on the host, mapped to /var/opt/mssql in the container.
Use by inheritance (recommended for apps)
Inherit the SQL Server runnable in your application and declare a connection. Example:Ports and connectivity
- Service:
mssql-svcon TCP port1433 - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the DB host.
Persistence and configuration
- Data path:
${monk-volume-path}/mssql:/var/opt/mssql - This volume contains all SQL Server data files, logs, and system databases.
Features
- Full T-SQL support
- ACID transactions
- Stored procedures and triggers
- Full-text search
- Replication and high availability
- Integration with Azure
- Business intelligence capabilities
Related templates
- See other templates in this repository for complementary services
- Combine with monitoring tools for observability
- Integrate with your application stack as needed
Troubleshooting
- If you changed
monk_mssql_sa_passwordbut the container has existing data, authentication may fail. Either reset the data volume or update the password inside the DB to match. - Ensure the host volumes are writable by the container user.
- The SA password must meet Microsoft’s complexity requirements (uppercase, lowercase, numbers, and special characters).
- Check logs: