-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
196 lines (185 loc) · 5.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
196 lines (185 loc) · 5.64 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
services:
sqlflowui:
build:
context: .
dockerfile: SQLFlowUi/Dockerfile
args:
BUILD_CONFIGURATION: Release
image: sqlflow-ui:latest
container_name: sqlflow-ui
restart: unless-stopped
ports:
- "8110:8110" # HTTP
- "8111:8111" # HTTPS
extra_hosts:
- "host.docker.internal:host-gateway"
- "sqlflow.ui:host-gateway"
volumes:
- sqlflow-keys:/app/data/keys
- sqlflow-data:/app/data
depends_on:
- sqlflowapi
environment:
# SQLFlow Connection string
- SQLFlowConStr=${SQLFlowConStr}
- SQLFlowOpenAiApiKey=${SQLFlowOpenAiApiKey}
# SSL
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=ChangeThisInProduction!
# Core configuration
- ASPNETCORE_ENVIRONMENT=Development # Use Development for dev environments | Production
- ASPNETCORE_URLS=http://+:8110;https://+:8111
- ASPNETCORE_HTTPS_PORT=8111
- LOG_LEVEL=Information
- ASPNETCORE_DATA_PROTECTION_KEYSDIR=/app/data/keys
# HTTPS/Certificate configuration
- USE_HTTPS=true
- CERT_SOURCE=generate
- CERT_PASSWORD=ChangeThisInProduction!
# API Configuration
- API_BASE_URL=https://sqlflow.api:8443
# SignalR configuration
- SIGNALR_ENABLED=true
- SIGNALR_TRANSPORT_TYPE=WebSockets,ServerSentEvents,LongPolling
- SIGNALR_MAX_MESSAGE_SIZE=20971520
# Additional SignalR settings
- SignalR__ClientTimeoutInterval=60
- SignalR__KeepAliveInterval=15
- SignalR__EnableDetailedErrors=true
- SignalR__StreamBufferCapacity=10
- SignalR__MaximumReceiveMessageSize=32768
# Network configuration
- CONNECTION_TIMEOUT=30
- CONNECTION_RETRIES=3
# Cloud configuration
- CLOUD_PROVIDER=auto-detect
networks:
- sqlflow-network
# SignalR optimized healthcheck
healthcheck:
test: ["CMD", "/bin/bash", "-c", "curl -k -f https://localhost:8444/health && curl -k -f https://localhost:8444/health/signalr || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
sqlflowapi:
build:
context: .
dockerfile: /SQLFlowApi/Dockerfile
args:
BUILD_CONFIGURATION: Release
image: sqlflow-api:latest
container_name: sqlflow-api
restart: unless-stopped
ports:
- "9110:9110" # HTTP
- "9111:9111" # HTTPS
volumes:
- sqlflow-keys:/app/data/keys
- sqlflow-data:/app/data
- sqlflow-sample-data:/c/SQLFlow
# For using custom certificates (when CERT_SOURCE=volume)
# - ./certs:/https
extra_hosts:
- "host.docker.internal:host-gateway"
- "sqlflow.api:host-gateway"
dns_opt:
- timeout:60
- attempts:3
environment:
# SQLFlow Connection string
- SQLFlowConStr=${SQLFlowConStr}
- SQLFlowOpenAiApiKey=${SQLFlowOpenAiApiKey}
# SSL
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=ChangeThisInProduction!
# Core configuration
- ASPNETCORE_DATA_PROTECTION_KEYSDIR=/app/data/keys
- ASPNETCORE_ENVIRONMENT=Development # Use Development for dev environments | Production
- ASPNETCORE_URLS=http://+:9110;https://+:9111
- LOG_LEVEL=Information
# HTTPS/Certificate configuration
- USE_HTTPS=true
- CERT_SOURCE=generate # Options: generate, volume, env
- CERT_PASSWORD=ChangeThisInProduction!
# Network configuration
- CONNECTION_TIMEOUT=30
- CONNECTION_RETRIES=3
- HTTP_PROXY=
- HTTPS_PROXY=
- NO_PROXY=localhost,127.0.0.1
# Cloud configuration - auto-detect by default
- CLOUD_PROVIDER=auto-detect # Options: auto-detect, aws, azure, gcp, generic
# Health check configuration
- HEALTH_ENDPOINT=/health
- HEALTH_TIMEOUT=5
- CHECK_HTTP_HEALTH=true
- CHECK_DISK_SPACE=true
- CHECK_MEMORY=true
- MIN_DISK_SPACE_MB=100
- MAX_MEMORY_PERCENT=90
# App-specific settings (customize as needed)
- YourAppSetting1=Value1
- YourAppSetting2=Value2
# Optional: connect to specific network
networks:
- sqlflow-network
# Override the health check parameters if needed
healthcheck:
test: ["CMD", "/app/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
sqlflow-mssql:
build:
context: .
dockerfile: SQLFlowDb/Dockerfile
image: sqlflow-mssql:latest
container_name: sqlflow-mssql
restart: unless-stopped
ports:
- "1477:1433"
volumes:
- sqlflow-mssql-data:/var/opt/mssql/data
- sqlflow-mssql-log:/var/opt/mssql/log
- sqlflow-mssql-bak:/var/opt/mssql/bak
environment:
- ACCEPT_EULA=Y
- MSSQL_PID=Developer
- MSSQL_SA_PASSWORD=Passw0rd123456
- MSSQL_AGENT_ENABLED=true
networks:
- sqlflow-network
healthcheck:
test: ["CMD", "/var/opt/mssql/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
ulimits:
nofile:
soft: 65536
hard: 65536
security_opt:
- seccomp:unconfined
volumes:
sqlflow-keys:
driver: local
sqlflow-data:
driver: local
sqlflow-sample-data:
driver: local
driver_opts:
type: none
device: C:/SQLFlow
o: bind
sqlflow-mssql-data:
driver: local
sqlflow-mssql-log:
driver: local
sqlflow-mssql-bak:
driver: local
networks:
sqlflow-network:
driver: bridge