-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (37 loc) · 1.06 KB
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (37 loc) · 1.06 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
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD:?Create .env from .env.example and set MSSQL_SA_PASSWORD}
ports:
- "14333:1433"
healthcheck:
test:
[
"CMD-SHELL",
"/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q \"SELECT 1\" -b -o /dev/null"
]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
volumes:
- cargoapi-sql-data:/var/opt/mssql
api:
build:
context: .
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: 8080
ConnectionStrings__DefaultConnection: >-
Server=sqlserver,1433;Database=CargoDb;User Id=sa;Password=${MSSQL_SA_PASSWORD};Encrypt=True;TrustServerCertificate=True;
Database__ApplyMigrations: "true"
depends_on:
sqlserver:
condition: service_healthy
ports:
- "8080:8080"
volumes:
cargoapi-sql-data: