-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (44 loc) · 1.21 KB
/
docker-compose.yml
File metadata and controls
49 lines (44 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
services:
db:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: api-db
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "${SA_PASSWORD}"
ports:
- "1433:1433"
volumes:
- mssql_data:/var/opt/mssql
healthcheck:
test:
[
"CMD-SHELL",
'/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$$MSSQL_SA_PASSWORD" -Q "SELECT 1" -C > /dev/null || exit 1',
]
interval: 10s
timeout: 5s
retries: 30
start_period: 20s
api:
build:
context: ./api
dockerfile: Dockerfile
container_name: api-app
depends_on:
db:
condition: service_healthy
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: "http://+:8080"
ASPNETCORE_HTTP_PORTS: ""
ASPNETCORE_HTTPS_PORTS: ""
ConnectionStrings__DefaultConnection: "Server=db;Database=${DB_NAME};User Id=sa;Password=${SA_PASSWORD};TrustServerCertificate=True;Encrypt=True;"
JWT__Issuer: "${JWT_ISSUER}"
JWT__Audience: "${JWT_AUDIENCE}"
JWT__SigningKey: "${JWT_SIGNING_KEY}"
FMPKey: "${FMP_KEY}"
SEED_DATA: "true"
ports:
- "8080:8080"
volumes:
mssql_data: