Add project files.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/.idea
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
@@ -0,0 +1,57 @@
|
||||
# Version: 1
|
||||
# Description: Dockerfile for building and running Elsa Server
|
||||
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build
|
||||
WORKDIR /source
|
||||
|
||||
# Copy sources.
|
||||
COPY src/. ./src
|
||||
COPY ./NuGet.Config ./
|
||||
COPY *.props ./
|
||||
|
||||
# Restore packages.
|
||||
RUN dotnet restore "./src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj"
|
||||
|
||||
# Build and publish (UseAppHost=false creates platform independent binaries).
|
||||
WORKDIR /source/src/bundles/Elsa.Server.Web
|
||||
RUN dotnet build "Elsa.Server.Web.csproj" -c Release -o /app/build
|
||||
RUN dotnet publish "Elsa.Server.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net9.0
|
||||
|
||||
# Move binaries into smaller base image.
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish ./
|
||||
|
||||
# Install Python 3.11
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3.11 \
|
||||
python3.11-dev \
|
||||
libpython3.11 \
|
||||
python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set PYTHONNET_PYDLL environment variable
|
||||
ENV PYTHONNET_PYDLL=/usr/lib/aarch64-linux-gnu/libpython3.11.so
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y wget unzip curl
|
||||
|
||||
# Set environment variables for OpenTelemetry Auto-Instrumentation
|
||||
ENV OTEL_DOTNET_AUTO_HOME=/otel
|
||||
ENV OTEL_LOG_LEVEL="debug"
|
||||
|
||||
# Download and extract OpenTelemetry Auto-Instrumentation
|
||||
ARG OTEL_VERSION=1.7.0
|
||||
RUN mkdir /otel
|
||||
RUN curl -L -o /otel/otel-dotnet-install.sh https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v${OTEL_VERSION}/otel-dotnet-auto-install.sh
|
||||
RUN chmod +x /otel/otel-dotnet-install.sh
|
||||
RUN /bin/bash /otel/otel-dotnet-install.sh
|
||||
|
||||
# Provide necessary permissions for the script to execute
|
||||
RUN chmod +x /otel/instrument.sh
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
EXPOSE 443/tcp
|
||||
|
||||
# Instrument the application and start it
|
||||
ENTRYPOINT ["/bin/bash", "-c", "source /otel/instrument.sh && dotnet Elsa.Server.Web.dll"]
|
||||
@@ -0,0 +1,35 @@
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build
|
||||
WORKDIR /source
|
||||
|
||||
# copy sources.
|
||||
COPY src/. ./src
|
||||
COPY ./NuGet.Config ./
|
||||
COPY *.props ./
|
||||
|
||||
# restore packages.
|
||||
RUN dotnet restore "./src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj"
|
||||
|
||||
# build and publish (UseAppHost=false creates platform independent binaries).
|
||||
WORKDIR /source/src/apps/Elsa.Server.Web
|
||||
RUN dotnet build "Elsa.Server.Web.csproj" -c Release -o /app/build
|
||||
RUN dotnet publish "Elsa.Server.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net9.0
|
||||
|
||||
# move binaries into smaller base image.
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish ./
|
||||
|
||||
# Install Python 3.11
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3.11 \
|
||||
python3.11-dev \
|
||||
libpython3.11 \
|
||||
python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set PYTHONNET_PYDLL environment variable
|
||||
ENV PYTHONNET_PYDLL=/usr/lib/aarch64-linux-gnu/libpython3.11.so
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
EXPOSE 443/tcp
|
||||
ENTRYPOINT ["dotnet", "Elsa.Server.Web.dll"]
|
||||
@@ -0,0 +1,36 @@
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build
|
||||
WORKDIR /source
|
||||
|
||||
# copy sources.
|
||||
COPY src/. ./src
|
||||
COPY ./NuGet.Config ./
|
||||
COPY *.props ./
|
||||
|
||||
# restore packages.
|
||||
RUN dotnet restore "./src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj"
|
||||
RUN dotnet restore "./src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj"
|
||||
|
||||
# build and publish (UseAppHost=false creates platform independent binaries).
|
||||
WORKDIR /source/src/apps/Elsa.ServerAndStudio.Web
|
||||
RUN dotnet build "Elsa.ServerAndStudio.Web.csproj" -c Release -o /app/build
|
||||
RUN dotnet publish "Elsa.ServerAndStudio.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net9.0
|
||||
|
||||
# move binaries into smaller base image.
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish ./
|
||||
|
||||
# Install Python 3.11
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3.11 \
|
||||
python3.11-dev \
|
||||
libpython3.11 \
|
||||
python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set PYTHONNET_PYDLL environment variable
|
||||
ENV PYTHONNET_PYDLL=/usr/lib/aarch64-linux-gnu/libpython3.11.so
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
EXPOSE 443/tcp
|
||||
ENTRYPOINT ["dotnet", "Elsa.ServerAndStudio.Web.dll"]
|
||||
@@ -0,0 +1,25 @@
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build
|
||||
WORKDIR /source
|
||||
|
||||
# copy sources.
|
||||
COPY src/. ./src
|
||||
COPY ./NuGet.Config ./
|
||||
COPY *.props ./
|
||||
|
||||
# restore packages.
|
||||
RUN dotnet restore "./src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj"
|
||||
RUN dotnet restore "./src/apps/Elsa.Studio.Web/Elsa.Studio.Web.csproj"
|
||||
|
||||
# build and publish (UseAppHost=false creates platform independent binaries).
|
||||
WORKDIR /source/src/apps/Elsa.Studio.Web
|
||||
RUN dotnet build "Elsa.Studio.Web.csproj" -c Release -o /app/build
|
||||
RUN dotnet publish "Elsa.Studio.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net9.0
|
||||
|
||||
# move binaries into smaller base image.
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish ./
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
EXPOSE 443/tcp
|
||||
ENTRYPOINT ["dotnet", "Elsa.Studio.Web.dll"]
|
||||
@@ -0,0 +1,115 @@
|
||||
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"
|
||||
|
||||
rabbitmq:
|
||||
image: "rabbitmq:3-management"
|
||||
ports:
|
||||
- "15672:15672"
|
||||
- "5672:5672"
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
|
||||
elsa-server:
|
||||
pull_policy: always
|
||||
build:
|
||||
context: ../.
|
||||
dockerfile: ./docker/ElsaServer-Datadog.Dockerfile
|
||||
depends_on:
|
||||
- postgres
|
||||
- rabbitmq
|
||||
- redis
|
||||
- otel-collector
|
||||
environment:
|
||||
DD_AGENT_HOST: datadog-agent
|
||||
DD_ENV: development
|
||||
DD_TRACE_DEBUG: true
|
||||
DD_TRACE_OTEL_ENABLED: true
|
||||
DD_SERVICE: "Elsa Server"
|
||||
DD_VERSION: "3.3.0"
|
||||
# OpenTelemetry environment variables
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4317" # Point to OpenTelemetry Collector
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" # Use gRPC for OTLP
|
||||
OTEL_TRACES_EXPORTER: "otlp"
|
||||
OTEL_METRICS_EXPORTER: "otlp"
|
||||
OTEL_LOGS_EXPORTER: "otpl"
|
||||
OTEL_RESOURCE_ATTRIBUTES: "service.name=elsa-server-local,service.version=3.2.1-blueberry,deployment.environment=development"
|
||||
OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES: "Elsa.Workflows"
|
||||
OTEL_DOTNET_AUTO_INSTRUMENTATION_ENABLED: "true"
|
||||
OTEL_LOG_LEVEL: "debug"
|
||||
OTEL_DOTNET_AUTO_RESOURCE_DETECTOR_ENABLED: "true"
|
||||
OTEL_DOTNET_AUTO_LOGS_CONSOLE_EXPORTER_ENABLED: "true"
|
||||
OTEL_DOTNET_AUTO_METRICS_CONSOLE_EXPORTER_ENABLED: "true"
|
||||
OTEL_DOTNET_AUTO_TRACES_CONSOLE_EXPORTER_ENABLED: "true"
|
||||
|
||||
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"
|
||||
|
||||
elsa-studio:
|
||||
pull_policy: always
|
||||
build:
|
||||
context: ../.
|
||||
dockerfile: ./docker/ElsaStudio.Dockerfile
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: Development
|
||||
ELSASERVER__URL: "http://localhost:13000/elsa/api"
|
||||
ports:
|
||||
- "14000:8080"
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:latest
|
||||
volumes:
|
||||
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
|
||||
command: [ "--config", "/etc/otel-collector-config.yaml", "--feature-gates", "-component.UseLocalHostAsDefaultHost" ]
|
||||
environment:
|
||||
DD_API_KEY: "secret api key"
|
||||
DD_SITE: "datadoghq.eu"
|
||||
ports:
|
||||
- "13133:13133"
|
||||
- "4317:4317"
|
||||
- "4318:4318"
|
||||
|
||||
datadog-agent:
|
||||
image: datadog/agent:latest
|
||||
environment:
|
||||
DD_API_KEY: "<hidden>"
|
||||
DD_SITE: "datadoghq.eu"
|
||||
DD_HOSTNAME: "otel-collector"
|
||||
DD_LOGS_ENABLED: "true"
|
||||
DD_OTLP_CONFIG_LOGS_ENABLED: "true"
|
||||
DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL: "true"
|
||||
DD_APM_ENABLED: "true"
|
||||
DD_APM_NON_LOCAL_TRAFFIC: "true"
|
||||
DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_GRPC_ENDPOINT: 0.0.0.0:4317 # The Datadog Agent expects traces from OpenTelemetry Collector
|
||||
DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT: 0.0.0.0:4318
|
||||
|
||||
# Service autodiscovery
|
||||
DD_AC_INCLUDE: "name:postgres,name:rabbitmq,name:redis,name:elsa-server"
|
||||
DD_AC_EXCLUDE: "name:datadog-agent"
|
||||
|
||||
ports:
|
||||
- "8126:8126"
|
||||
- "14317:4317"
|
||||
- "14318:4318"
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
@@ -0,0 +1,167 @@
|
||||
---
|
||||
version: '2'
|
||||
services:
|
||||
|
||||
broker:
|
||||
image: confluentinc/cp-kafka:7.7.1
|
||||
hostname: broker
|
||||
container_name: broker
|
||||
ports:
|
||||
- "9092:9092"
|
||||
- "9101:9101"
|
||||
environment:
|
||||
KAFKA_NODE_ID: 1
|
||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
|
||||
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
|
||||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
||||
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
|
||||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
|
||||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
|
||||
KAFKA_JMX_PORT: 9101
|
||||
KAFKA_JMX_HOSTNAME: localhost
|
||||
KAFKA_PROCESS_ROLES: 'broker,controller'
|
||||
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
|
||||
KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
|
||||
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
|
||||
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
|
||||
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
|
||||
# Replace CLUSTER_ID with a unique base64 UUID using "bin/kafka-storage.sh random-uuid"
|
||||
# See https://docs.confluent.io/kafka/operations-tools/kafka-tools.html#kafka-storage-sh
|
||||
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
|
||||
|
||||
schema-registry:
|
||||
image: confluentinc/cp-schema-registry:7.7.1
|
||||
hostname: schema-registry
|
||||
container_name: schema-registry
|
||||
depends_on:
|
||||
- broker
|
||||
ports:
|
||||
- "8081:8081"
|
||||
environment:
|
||||
SCHEMA_REGISTRY_HOST_NAME: schema-registry
|
||||
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:29092'
|
||||
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
|
||||
|
||||
connect:
|
||||
image: cnfldemos/cp-server-connect-datagen:0.6.4-7.6.0
|
||||
hostname: connect
|
||||
container_name: connect
|
||||
depends_on:
|
||||
- broker
|
||||
- schema-registry
|
||||
ports:
|
||||
- "8083:8083"
|
||||
environment:
|
||||
CONNECT_BOOTSTRAP_SERVERS: 'broker:29092'
|
||||
CONNECT_REST_ADVERTISED_HOST_NAME: connect
|
||||
CONNECT_GROUP_ID: compose-connect-group
|
||||
CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs
|
||||
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
|
||||
CONNECT_OFFSET_FLUSH_INTERVAL_MS: 10000
|
||||
CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets
|
||||
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
|
||||
CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status
|
||||
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
|
||||
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
|
||||
CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
|
||||
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
|
||||
# CLASSPATH required due to CC-2422
|
||||
CLASSPATH: /usr/share/java/monitoring-interceptors/monitoring-interceptors-7.7.1.jar
|
||||
CONNECT_PRODUCER_INTERCEPTOR_CLASSES: "io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor"
|
||||
CONNECT_CONSUMER_INTERCEPTOR_CLASSES: "io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor"
|
||||
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components"
|
||||
CONNECT_LOG4J_LOGGERS: org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR
|
||||
|
||||
control-center:
|
||||
image: confluentinc/cp-enterprise-control-center:7.7.1
|
||||
hostname: control-center
|
||||
container_name: control-center
|
||||
depends_on:
|
||||
- broker
|
||||
- schema-registry
|
||||
- connect
|
||||
- ksqldb-server
|
||||
ports:
|
||||
- "9021:9021"
|
||||
environment:
|
||||
CONTROL_CENTER_BOOTSTRAP_SERVERS: 'broker:29092'
|
||||
CONTROL_CENTER_CONNECT_CONNECT-DEFAULT_CLUSTER: 'connect:8083'
|
||||
CONTROL_CENTER_CONNECT_HEALTHCHECK_ENDPOINT: '/connectors'
|
||||
CONTROL_CENTER_KSQL_KSQLDB1_URL: "http://ksqldb-server:8088"
|
||||
CONTROL_CENTER_KSQL_KSQLDB1_ADVERTISED_URL: "http://localhost:8088"
|
||||
CONTROL_CENTER_SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
|
||||
CONTROL_CENTER_REPLICATION_FACTOR: 1
|
||||
CONTROL_CENTER_INTERNAL_TOPICS_PARTITIONS: 1
|
||||
CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS: 1
|
||||
CONFLUENT_METRICS_TOPIC_REPLICATION: 1
|
||||
PORT: 9021
|
||||
|
||||
ksqldb-server:
|
||||
image: confluentinc/cp-ksqldb-server:7.7.1
|
||||
hostname: ksqldb-server
|
||||
container_name: ksqldb-server
|
||||
depends_on:
|
||||
- broker
|
||||
- connect
|
||||
ports:
|
||||
- "8088:8088"
|
||||
environment:
|
||||
KSQL_CONFIG_DIR: "/etc/ksql"
|
||||
KSQL_BOOTSTRAP_SERVERS: "broker:29092"
|
||||
KSQL_HOST_NAME: ksqldb-server
|
||||
KSQL_LISTENERS: "http://0.0.0.0:8088"
|
||||
KSQL_CACHE_MAX_BYTES_BUFFERING: 0
|
||||
KSQL_KSQL_SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
|
||||
KSQL_PRODUCER_INTERCEPTOR_CLASSES: "io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor"
|
||||
KSQL_CONSUMER_INTERCEPTOR_CLASSES: "io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor"
|
||||
KSQL_KSQL_CONNECT_URL: "http://connect:8083"
|
||||
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_REPLICATION_FACTOR: 1
|
||||
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: 'true'
|
||||
KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: 'true'
|
||||
|
||||
ksqldb-cli:
|
||||
image: confluentinc/cp-ksqldb-cli:7.7.1
|
||||
container_name: ksqldb-cli
|
||||
depends_on:
|
||||
- broker
|
||||
- connect
|
||||
- ksqldb-server
|
||||
entrypoint: /bin/sh
|
||||
tty: true
|
||||
|
||||
ksql-datagen:
|
||||
image: confluentinc/ksqldb-examples:7.7.1
|
||||
hostname: ksql-datagen
|
||||
container_name: ksql-datagen
|
||||
depends_on:
|
||||
- ksqldb-server
|
||||
- broker
|
||||
- schema-registry
|
||||
- connect
|
||||
command: "bash -c 'echo Waiting for Kafka to be ready... && \
|
||||
cub kafka-ready -b broker:29092 1 40 && \
|
||||
echo Waiting for Confluent Schema Registry to be ready... && \
|
||||
cub sr-ready schema-registry 8081 40 && \
|
||||
echo Waiting a few seconds for topic creation to finish... && \
|
||||
sleep 11 && \
|
||||
tail -f /dev/null'"
|
||||
environment:
|
||||
KSQL_CONFIG_DIR: "/etc/ksql"
|
||||
STREAMS_BOOTSTRAP_SERVERS: broker:29092
|
||||
STREAMS_SCHEMA_REGISTRY_HOST: schema-registry
|
||||
STREAMS_SCHEMA_REGISTRY_PORT: 8081
|
||||
|
||||
rest-proxy:
|
||||
image: confluentinc/cp-kafka-rest:7.7.1
|
||||
depends_on:
|
||||
- broker
|
||||
- schema-registry
|
||||
ports:
|
||||
- 8082:8082
|
||||
hostname: rest-proxy
|
||||
container_name: rest-proxy
|
||||
environment:
|
||||
KAFKA_REST_HOST_NAME: rest-proxy
|
||||
KAFKA_REST_BOOTSTRAP_SERVERS: 'broker:29092'
|
||||
KAFKA_REST_LISTENERS: "http://0.0.0.0:8082"
|
||||
KAFKA_REST_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
|
||||
@@ -0,0 +1,164 @@
|
||||
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
|
||||
- ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh # This will initialize the 'tracelens' database
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
sqlserver:
|
||||
image: mcr.microsoft.com/mssql/server:2022-latest
|
||||
environment:
|
||||
- ACCEPT_EULA=Y
|
||||
- MSSQL_SA_PASSWORD=!Elsa2025@
|
||||
ports:
|
||||
- 1433:1433
|
||||
volumes:
|
||||
- sqlserver_data:/var/opt/mssql
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: mysql
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_DATABASE: elsa
|
||||
MYSQL_USER: admin
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql_data2:/var/lib/mysql
|
||||
|
||||
oracle:
|
||||
image: container-registry.oracle.com/database/free:latest
|
||||
container_name: oracle-db
|
||||
environment:
|
||||
ORACLE_PWD: elsa
|
||||
ports:
|
||||
- "1521:1521"
|
||||
- "5500:5500"
|
||||
volumes:
|
||||
- ./data/oracle-data:/opt/oracle/oradata
|
||||
- ./setup/oracle-setup:/opt/oracle/scripts/setup
|
||||
|
||||
mongodb:
|
||||
image: mongo:latest
|
||||
ports:
|
||||
- "127.0.0.1:27017:27017"
|
||||
volumes:
|
||||
- mongodb_data:/data/db
|
||||
|
||||
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
|
||||
|
||||
rabbitmq:
|
||||
image: "rabbitmq:4-management"
|
||||
ports:
|
||||
- "15672:15672"
|
||||
- "5672:5672"
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
|
||||
plantuml-server:
|
||||
image: plantuml/plantuml-server:tomcat
|
||||
container_name: plantuml-server
|
||||
ports:
|
||||
- 7080:8080
|
||||
|
||||
trace-lens:
|
||||
image: docker.io/rogeralsing/tracelens:latest
|
||||
pull_policy: always
|
||||
depends_on:
|
||||
- plantuml-server
|
||||
- postgres
|
||||
ports:
|
||||
- 7001:5001
|
||||
- 4317:4317
|
||||
environment:
|
||||
- PlantUml__RemoteUrl=
|
||||
- ConnectionStrings__DefaultConnection=USER ID=tracelens;PASSWORD=tracelenspass;HOST=postgres;PORT=5432;DATABASE=tracelens;POOLING=true;
|
||||
|
||||
smtp4dev: # Mock SMTP server
|
||||
image: rnwood/smtp4dev
|
||||
container_name: smtp4dev
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:80" # Web interface
|
||||
- "2525:25" # SMTP port
|
||||
environment:
|
||||
- ASPNETCORE_URLS=http://+:80
|
||||
- Logging__LogLevel__Default=Information
|
||||
|
||||
azurite:
|
||||
image: mcr.microsoft.com/azure-storage/azurite
|
||||
container_name: azurite
|
||||
command: >
|
||||
azurite
|
||||
--blobHost 0.0.0.0 --blobPort 10010
|
||||
--queueHost 0.0.0.0 --queuePort 10011
|
||||
--tableHost 0.0.0.0 --tablePort 10012
|
||||
--location /data
|
||||
--debug /data/debug.log
|
||||
--skipApiVersionCheck
|
||||
--loose
|
||||
ports:
|
||||
- "10010:10010" # Blob service
|
||||
- "10011:10011" # Queue service
|
||||
- "10012:10012" # Table service
|
||||
volumes:
|
||||
- ./azurite-data:/data
|
||||
restart: always
|
||||
|
||||
elsa-server:
|
||||
build:
|
||||
context: ../.
|
||||
dockerfile: ./docker/ElsaServer.Dockerfile
|
||||
depends_on:
|
||||
- postgres
|
||||
- rabbitmq
|
||||
- redis
|
||||
environment:
|
||||
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"
|
||||
|
||||
elsa-studio:
|
||||
build:
|
||||
context: ../.
|
||||
dockerfile: ./docker/ElsaStudio.Dockerfile
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: Development
|
||||
ELSASERVER__URL: "http://localhost:13000/elsa/api"
|
||||
ports:
|
||||
- "14000:8080"
|
||||
|
||||
volumes:
|
||||
sqlserver_data:
|
||||
postgres-data:
|
||||
oracle-data-free1:
|
||||
mysql_data2:
|
||||
cockroachdb-data:
|
||||
mongodb_data:
|
||||
@@ -0,0 +1,9 @@
|
||||
echo "Starting database initialization"
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER tracelens WITH PASSWORD 'tracelenspass';
|
||||
CREATE DATABASE tracelens;
|
||||
GRANT ALL PRIVILEGES ON DATABASE tracelens TO tracelens;
|
||||
EOSQL
|
||||
|
||||
echo "Database initialization completed"
|
||||
@@ -0,0 +1,49 @@
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
|
||||
processors:
|
||||
batch:
|
||||
send_batch_max_size: 100
|
||||
send_batch_size: 10 # Increased batch size for efficiency
|
||||
timeout: 1s
|
||||
tail_sampling:
|
||||
decision_wait: 10s
|
||||
num_traces: 10000 # Increased from 100 to handle more traces
|
||||
expected_new_traces_per_sec: 100 # Increased from 10
|
||||
decision_cache:
|
||||
sampled_cache_size: 100000
|
||||
policies: [
|
||||
{
|
||||
name: incidents-policy,
|
||||
type: boolean_attribute,
|
||||
boolean_attribute: { key: hasIncidents, value: true }
|
||||
}
|
||||
]
|
||||
|
||||
exporters:
|
||||
debug:
|
||||
verbosity: detailed
|
||||
datadog:
|
||||
api:
|
||||
site: ${env:DD_SITE}
|
||||
key: ${env:DD_API_KEY}
|
||||
|
||||
service:
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [ otlp ]
|
||||
processors: [ batch ]
|
||||
exporters: [ datadog ]
|
||||
traces:
|
||||
receivers: [ otlp ]
|
||||
processors: [ batch ] # Added tail_sampling to the main traces pipeline
|
||||
exporters: [ debug, datadog ] # Directly exporting to debug and datadog
|
||||
logs:
|
||||
receivers: [ otlp ]
|
||||
processors: [ batch ]
|
||||
exporters: [ debug, datadog ]
|
||||
@@ -0,0 +1,3 @@
|
||||
alter session set "_ORACLE_SCRIPT"=true;
|
||||
CREATE USER ELSA IDENTIFIED BY elsa;
|
||||
GRANT ALL PRIVILEGES TO ELSA;
|
||||
Reference in New Issue
Block a user