-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.96 KB
/
docker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# DataChat Docker Compose Configuration
# Usage: docker-compose up -d
services:
datachat:
build:
context: .
dockerfile: Dockerfile
container_name: datachat-web
ports:
- "8080:8080"
- "8081:8081"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ConnectionStrings__DefaultConnection=Server=sql;Database=DataChat;User Id=sa;Password=${SQL_SA_PASSWORD:-YourStrong@Passw0rd};TrustServerCertificate=True;MultipleActiveResultSets=true
- APPLY_MIGRATIONS=true
# Optional HTTPS configuration (uncomment to enable)
# - HTTPS_CERTIFICATE_PATH=/app/certs/datachat.pfx
# - HTTPS_CERTIFICATE_PASSWORD=YourCertPassword
# - HTTP_PORT=8080
# - HTTPS_PORT=8081
volumes:
- datachat-keys:/app/data-protection-keys
- datachat-logs:/app/logs
- datachat-uploads:/app/uploads
# Mount certificate for HTTPS (uncomment if using)
# - ./certs:/app/certs:ro
depends_on:
sql:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health/live"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
sql:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: datachat-sql
ports:
- "1433:1433"
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=${SQL_SA_PASSWORD:-YourStrong@Passw0rd}
- MSSQL_PID=Express
volumes:
- datachat-sqldata:/var/opt/mssql
restart: unless-stopped
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "${SQL_SA_PASSWORD:-YourStrong@Passw0rd}" -C -Q "SELECT 1" || exit 1
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
volumes:
datachat-keys:
driver: local
datachat-logs:
driver: local
datachat-uploads:
driver: local
datachat-sqldata:
driver: local