-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (30 loc) · 871 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (30 loc) · 871 Bytes
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
services:
db:
image: "mcr.microsoft.com/mssql/server:2022-latest"
environment:
# Read the password from the .env file
SA_PASSWORD: ${DB_PASSWORD}
ACCEPT_EULA: "Y"
ports:
- "1433:1433"
healthcheck:
# Use the same variable here to ensure it always matches
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P '${DB_PASSWORD}' -Q 'SELECT 1' || exit 1"]
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
api:
build:
context: .
dockerfile: InterviewTracker.Api/Dockerfile
ports:
- "8080:8080"
# - "8081:8081"
environment:
- ConnectionStrings__DefaultConnection=${ConnectionStrings__DockerConnection}
- ASPNETCORE_HTTP_PORTS=8080
# - ASPNETCORE_HTTPS_PORTS=8081
depends_on:
db:
condition: service_healthy