MsSQL
Specific configuration for MsSQL.
MsSQL is fully supported by the Portabase agent. We use native sqlpackage tool to ensure consistent and reliable backups and restorations.
MsSQL has strict password complexity requirements. Your password must be at least 8 characters long and contain characters from three of the following four categories: Latin uppercase letters, Latin lowercase letters, digits (0 through 9), and non-alphanumeric characters (e.g., !, $, #, %). Failure to meet these requirements will cause the container to crash.
Configuration
When running portabase db add, select mssql as the database type.
In your databases.json (or .toml) file, configure the following block.
{
"name": "Database - MsSQL",
"database": "myappdb",
"type": "mssql",
"username": "sa",
"password": "Password!Strong1",
"port": 1433,
"host": "db-mssql",
"generated_id": "..."
}Generating...Docker Compose Example
Here is how to configure a MsSQL service alongside the agent.
services:
db-mssql:
container_name: db-mssql
image: mcr.microsoft.com/azure-sql-edge:latest
ports:
- "1433:1433"
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "Password!Strong1"
volumes:
- mssql-data:/var/opt/mssql
networks:
- portabase
healthcheck:
test: ["CMD-SHELL", "cat /proc/net/tcp6 | grep -q '059901' || exit 1"]
interval: 10s
timeout: 5s
retries: 20
agent:
image: portabase/agent:latest
# ... agent configuration ...
depends_on:
- db-mssql
networks:
- portabase
networks:
portabase:
external: true
volumes:
mssql-data:If you use localhost as the host (because the agent is on the host machine and not in Docker, or via host-gateway), ensure your database is listening on all interfaces (0.0.0.0) or is accessible from the agent.
Last updated on