PayrollManagementSystem/docker/docker-compose.tplus.dev.yml

44 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# T+ SQL Server 恢复 PoC
#
# 使用前:
# 1. 复制 docker/tplus.env.example 为 D:\work\app\tplus-sqlserver\.env;
# 2. 将客户 .bak 放入 D:\work\app\tplus-sqlserver\backup;
# 3. SQL Server 数据、日志和备份通过绑定目录写入 D 盘;不修改 Docker Desktop 的磁盘镜像设置。
name: ys-payroll-tplus
services:
tplus-sqlserver:
image: ${TPLUS_SQLSERVER_IMAGE:-mcr.microsoft.com/mssql/server:2022-CU16-ubuntu-22.04}
container_name: ys-tplus-sqlserver-dev
restart: unless-stopped
environment:
ACCEPT_EULA: "Y"
MSSQL_PID: Developer
MSSQL_SA_PASSWORD: ${TPLUS_SA_PASSWORD:?请在 D:/work/app/tplus-sqlserver/.env 设置 TPLUS_SA_PASSWORD}
TZ: Asia/Shanghai
ports:
- "1433:1433"
volumes:
- type: bind
source: ${TPLUS_ROOT:-D:/work/app/tplus-sqlserver}/data
target: /var/opt/mssql/data
- type: bind
source: ${TPLUS_ROOT:-D:/work/app/tplus-sqlserver}/log
target: /var/opt/mssql/log
- type: bind
source: ${TPLUS_ROOT:-D:/work/app/tplus-sqlserver}/backup
target: /var/opt/mssql/backup
read_only: true
- type: bind
source: ${TPLUS_ROOT:-D:/work/app/tplus-sqlserver}/scripts
target: /opt/tplus/scripts
read_only: true
healthcheck:
test:
- CMD-SHELL
- /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$${MSSQL_SA_PASSWORD}" -C -Q "SELECT 1" >/dev/null 2>&1
interval: 10s
timeout: 5s
retries: 20
start_period: 30s