Clone
3
Microsoft SQL Server
Patrick Gniza edited this page 2026-08-17 10:48:39 +02:00

Deutsch | English

Microsoft SQL Server

Microsoft SQL Server is the default and most tested database backend.


Compose Service

The MSSQL service uses the official Microsoft SQL Server image:

mssql:
  image: mcr.microsoft.com/mssql/server:2022-latest
  container_name: romexis-mssql
  environment:
    ACCEPT_EULA: "Y"
    MSSQL_SA_PASSWORD: "${MSSQL_SA_PASSWORD}"
    MSSQL_PID: "${MSSQL_PID:-Express}"
  ports:
    - "${MSSQL_PORT}:1433"
  volumes:
    - mssql_data:/var/opt/mssql
    - ${DATABASE_BACKUP_DIR}:/var/opt/mssql/backup

Romexis Settings

SERVER_DB=5
MSSQL_HOST=mssql
MSSQL_PORT=1433
MSSQL_SA_PASSWORD=<strong-password>

ROMEXIS_DB_NAME=Romexis_db
ROMEXIS_DB_USER=romexis
ROMEXIS_DB_PASSWORD=<strong-password>

Generated JDBC URL:

jdbc:sqlserver://mssql:1433;databaseName=Romexis_db;encrypt=true;trustServerCertificate=true;

Initialization

The MSSQL initializer:

/opt/init-romexis-mssql-db.sh

Responsibilities:

  • wait for SQL Server
  • create Romexis database if missing
  • create/update Romexis database user
  • import base SQL scripts
  • import update scripts up to the target schema marker
  • update runtime paths in RBA_Server_Param_S

Backup Directory

DATABASE_BACKUP_DIR is mounted into both the migration service and SQL Server:

Migration service: /upload/database
SQL Server:        /var/opt/mssql/backup

This allows the migration service to upload a .bak file and trigger a database restore.