-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
27 lines (25 loc) · 914 Bytes
/
compose.yaml
File metadata and controls
27 lines (25 loc) · 914 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
services:
webapi:
build:
context: . # To allow the Dockerfile to access all solution files (When we use COPY commands in the Dockerfile, paths are relative to this context)
dockerfile: src/API/Dockerfile
image: hardwaremarket/webapi:latest
env_file: webapi.env
ports:
- 5000:8080
depends_on:
- sqlserver
volumes:
- webapi-logs:/app/Logs
- dataprotection-keys:/root/.aspnet/DataProtection-Keys
sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
env_file: sqlserver.env
ports:
- 1433:1433
volumes:
- sqlserver-data:/var/opt/mssql
volumes:
webapi-logs:
sqlserver-data:
dataprotection-keys: # For DataProtection keys otherwise I will got a warning that the keys will be unavailable when the container is destroyed see:https://andrewlock.net/an-introduction-to-the-data-protection-system-in-asp-net-core