-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy pathcompose.yaml
51 lines (49 loc) · 1.92 KB
/
compose.yaml
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
# Tell us about your experience using dotnet monitor: https://aka.ms/dotnet-monitor-survey
services:
app:
image: mcr.microsoft.com/dotnet/samples:aspnetapp-chiseled
ports:
- "8080:8080"
environment:
- DOTNET_DiagnosticPorts=/diag/dotnet-monitor.sock
volumes:
- diagvol:/diag
deploy:
resources:
limits:
cpus: '0.250'
memory: 512M
monitor:
image: mcr.microsoft.com/dotnet/monitor:8
# DO NOT use the --no-auth argument for deployments in production; this argument is used for demonstration
# purposes only in this example. Please continue reading after this example for further details.
command: ["collect", "--no-auth"]
ports:
- "52323:52323"
- "52325:52325"
environment:
- DOTNETMONITOR_DiagnosticPort__ConnectionMode=Listen
- DOTNETMONITOR_Storage__DefaultSharedPath=/diag
# ALWAYS use the HTTPS form of the URL for deployments in production; the removal of HTTPS is done for
# demonstration purposes only in this example. Please continue reading after this example for further details.
- DOTNETMONITOR_Urls=http://+:52323
# The metrics URL is set in the CMD instruction of the image by default. However, this deployment overrides that with the args setting; manually set the URL to the same value using configuration.
- DOTNETMONITOR_Metrics__Endpoints=http://+:52325
# The image will output logging in a json format by default, which is great for ingestion by tools such as Azure Monitor Log Analytics.
# Switch the logging format to simple for this sample for easier reading.
- Logging__Console__FormatterName=simple
volumes:
- diagvol:/diag
deploy:
resources:
reservations:
cpus: '0.050'
memory: 50M
limits:
cpus: '0.250'
memory: 256M
volumes:
diagvol:
driver_opts:
type: tmpfs
device: tmpfs