-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (45 loc) · 1.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (45 loc) · 1.21 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
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: taskflow-sqlserver
env_file:
- .env
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "${SQL_SA_PASSWORD}"
ports:
- "1433:1433"
volumes:
- taskflow-sql-data:/var/opt/mssql
healthcheck:
test:
[
"CMD-SHELL",
"/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q \"SELECT 1\" || exit 1"
]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
api:
build:
context: .
dockerfile: Dockerfile
container_name: taskflow-api
env_file:
- .env
environment:
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
ConnectionStrings__DefaultConnection: "Server=sqlserver,1433;Database=TaskFlowDb;User Id=sa;Password=${SQL_SA_PASSWORD};TrustServerCertificate=True"
Jwt__Secret: "${JWT_SECRET}"
Jwt__Issuer: "TaskFlow.Api"
Jwt__Audience: "TaskFlow.Client"
Jwt__ExpiryMinutes: "60"
ports:
- "8080:8080"
depends_on:
sqlserver:
condition: service_healthy
volumes:
taskflow-sql-data: