-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (65 loc) · 1.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (65 loc) · 1.76 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
version: "3.9"
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
container_name: csn_sql
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "YourStrong!Passw0rd"
ports:
- "1433:1433"
volumes:
- csn_sql_data:/var/opt/mssql
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'YourStrong!Passw0rd' -Q 'SELECT 1' -C || exit 1"]
interval: 10s
timeout: 5s
retries: 20
ai:
build:
context: ./src/ai-service
dockerfile: Dockerfile
container_name: csn_ai
ports:
- "8000:8000"
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./src/ai-service/model:/app/model:ro
healthcheck:
test: ["CMD", "python", "-c", "import requests; print(requests.get('http://localhost:8000/health').status_code)"]
interval: 15s
timeout: 5s
retries: 10
api:
build:
context: ./src/Childsafenet.Api
dockerfile: Dockerfile
container_name: csn_api
ports:
- "7047:8080"
environment:
- ASPNETCORE_URLS=http://+:8080
- ConnectionStrings__Default=Server=THANGNTB\\THANGNTB;Database=ChildSafeNet_DB;Trusted_Connection=True;TrustServerCertificate=True;;
- AiService__BaseUrl=http://ai:8000
- Jwt__Key=CHANGE_ME_SUPER_SECRET_KEY_1234567890
- Jwt__Issuer=ChildSafeNet
- Jwt__Audience=ChildSafeNet
depends_on:
sqlserver:
condition: service_healthy
ai:
condition: service_healthy
web:
build:
context: ./src/Childsafenet.Frontend
dockerfile: Dockerfile
container_name: csn_web
ports:
- "5173:80"
environment:
- VITE_API_BASE=http://localhost:7047
depends_on:
- api
volumes:
csn_sql_data: