Private
Public Access
Microsoft SQL Server hinzugefügt
@@ -0,0 +1,77 @@
|
||||
# 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:
|
||||
|
||||
```yaml
|
||||
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
|
||||
|
||||
```env
|
||||
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:
|
||||
|
||||
```text
|
||||
jdbc:sqlserver://mssql:1433;databaseName=Romexis_db;encrypt=true;trustServerCertificate=true;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Initialization
|
||||
|
||||
The MSSQL initializer:
|
||||
|
||||
```text
|
||||
/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:
|
||||
|
||||
```text
|
||||
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.
|
||||
Reference in New Issue
Block a user