2024-03-24 19:28:19 +00:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:latest
|
|
|
|
|
command: -c 'max_connections=2000'
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: elsa
|
|
|
|
|
POSTGRES_PASSWORD: elsa
|
|
|
|
|
POSTGRES_DB: elsa
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
2024-09-23 21:35:30 +00:00
|
|
|
|
2024-03-24 19:28:19 +00:00
|
|
|
cockroachdb:
|
|
|
|
|
image: cockroachdb/cockroach:v22.1.0
|
|
|
|
|
command: start-single-node --insecure
|
|
|
|
|
ports:
|
|
|
|
|
- "26257:26257" # CockroachDB SQL port
|
|
|
|
|
- "8080:8080" # CockroachDB UI port
|
|
|
|
|
volumes:
|
|
|
|
|
- cockroachdb-data:/cockroach/cockroach-data
|
|
|
|
|
environment:
|
|
|
|
|
- COCKROACH_DATABASE=elsa
|
2024-09-23 21:35:30 +00:00
|
|
|
|
2024-03-24 19:28:19 +00:00
|
|
|
rabbitmq:
|
|
|
|
|
image: "rabbitmq:3-management"
|
|
|
|
|
ports:
|
|
|
|
|
- "15672:15672"
|
|
|
|
|
- "5672:5672"
|
2024-09-23 21:35:30 +00:00
|
|
|
|
2024-03-24 19:28:19 +00:00
|
|
|
redis:
|
|
|
|
|
image: redis:latest
|
|
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:6379:6379"
|
|
|
|
|
|
|
|
|
|
elsa-server:
|
2024-09-23 21:35:30 +00:00
|
|
|
pull_policy: always
|
2024-03-24 19:28:19 +00:00
|
|
|
build:
|
|
|
|
|
context: ../.
|
|
|
|
|
dockerfile: ./docker/ElsaServer-Datadog.Dockerfile
|
|
|
|
|
depends_on:
|
|
|
|
|
- postgres
|
|
|
|
|
- rabbitmq
|
|
|
|
|
- redis
|
|
|
|
|
- datadog-agent
|
|
|
|
|
environment:
|
|
|
|
|
DD_AGENT_HOST: datadog-agent
|
2024-09-23 21:35:30 +00:00
|
|
|
DD_ENV: development
|
|
|
|
|
DD_TRACE_DEBUG: true
|
|
|
|
|
DD_TRACE_OTEL_ENABLED: true
|
|
|
|
|
DD_SERVICE: "elsa-server-local"
|
|
|
|
|
DD_VERSION: "3.2.1-blueberry"
|
2024-03-24 19:28:19 +00:00
|
|
|
ASPNETCORE_ENVIRONMENT: Development
|
|
|
|
|
PYTHONNET_PYDLL: /opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11
|
|
|
|
|
PYTHONNET_RUNTIME: coreclr
|
|
|
|
|
CONNECTIONSTRINGS__POSTGRESQL: "Server=postgres;Username=elsa;Database=elsa;Port=5432;Password=elsa;SSLMode=Prefer"
|
|
|
|
|
CONNECTIONSTRINGS__RABBITMQ: "amqp://guest:guest@rabbitmq:5672/"
|
|
|
|
|
CONNECTIONSTRINGS__REDIS: "redis:6379"
|
|
|
|
|
DISTRIBUTEDLOCKPROVIDER: "Postgres"
|
|
|
|
|
ports:
|
|
|
|
|
- "13000:8080"
|
2024-09-23 21:35:30 +00:00
|
|
|
|
2024-03-24 19:28:19 +00:00
|
|
|
elsa-studio:
|
2024-09-23 21:35:30 +00:00
|
|
|
pull_policy: always
|
2024-03-24 19:28:19 +00:00
|
|
|
build:
|
|
|
|
|
context: ../.
|
2024-09-23 21:35:30 +00:00
|
|
|
dockerfile: ./docker/ElsaStudio.Dockerfile
|
2024-03-24 19:28:19 +00:00
|
|
|
environment:
|
|
|
|
|
ASPNETCORE_ENVIRONMENT: Development
|
|
|
|
|
ELSASERVER__URL: "http://localhost:13000/elsa/api"
|
|
|
|
|
ports:
|
|
|
|
|
- "14000:8080"
|
|
|
|
|
|
|
|
|
|
datadog-agent:
|
2024-09-23 21:35:30 +00:00
|
|
|
image: datadog/agent:7.42.0
|
2024-03-24 19:28:19 +00:00
|
|
|
environment:
|
|
|
|
|
DD_API_KEY: "YOUR_API_KEY"
|
|
|
|
|
DD_SITE: "datadoghq.eu"
|
|
|
|
|
DD_LOGS_ENABLED: "true"
|
|
|
|
|
DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL: "true"
|
|
|
|
|
DD_APM_ENABLED: "true"
|
2024-09-23 21:35:30 +00:00
|
|
|
DD_REMOTE_CONFIGURATION_ENABLED: "true"
|
2024-03-24 19:28:19 +00:00
|
|
|
DD_APM_NON_LOCAL_TRAFFIC: "true"
|
2024-09-23 21:35:30 +00:00
|
|
|
|
|
|
|
|
# Service autodiscovery
|
2024-03-24 19:28:19 +00:00
|
|
|
DD_AC_INCLUDE: "name:postgres,name:rabbitmq,name:redis,name:elsa-server"
|
|
|
|
|
DD_AC_EXCLUDE: "name:datadog-agent"
|
2024-09-23 21:35:30 +00:00
|
|
|
|
|
|
|
|
# Enable priority sampling
|
|
|
|
|
DD_TRACE_SAMPLING_PRIORITY: "true"
|
|
|
|
|
|
|
|
|
|
# Global rate limiting of traces (number of spans per second)
|
|
|
|
|
DD_TRACE_RATE_LIMIT: 100
|
|
|
|
|
|
|
|
|
|
# Global sample rate for all traces (applies to spans that do not match a specific sampling rule)
|
|
|
|
|
DD_TRACE_SAMPLE_RATE: 1.0 # Keep 100% of the traces globally (adjust as needed)
|
|
|
|
|
|
|
|
|
|
# Sampling rules for controlling sampling of specific services and errors
|
|
|
|
|
DD_TRACE_SAMPLING_RULES: >
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"service": "elsa-server-local",
|
|
|
|
|
"name": "WorkflowExecution",
|
|
|
|
|
"sample_rate": 0.5
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"service": "elsa-server-local",
|
|
|
|
|
"name": "WorkflowExecution",
|
|
|
|
|
"sample_rate": 1.0,
|
|
|
|
|
"condition": {"tags": {"hasIncidents": "true"}}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
"service": "elsa-server-local",
|
|
|
|
|
"name": "ActivityExecution",
|
|
|
|
|
"sample_rate": 1.0,
|
|
|
|
|
"condition": {"tags": {"hasIncidents": "true"}}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"service": "elsa-server-local",
|
|
|
|
|
"name": "ActivityExecution",
|
|
|
|
|
"sample_rate": 0.3
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"service": "elsa-server-local",
|
|
|
|
|
"sample_rate": 1.0,
|
|
|
|
|
"condition": {"error": true}
|
|
|
|
|
}
|
|
|
|
|
]
|
2024-03-24 19:28:19 +00:00
|
|
|
volumes:
|
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
|
- /proc/:/host/proc/:ro
|
|
|
|
|
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
|
|
|
|
|
ports:
|
|
|
|
|
- "8126:8126"
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres-data:
|
|
|
|
|
cockroachdb-data:
|