elsa-core/docker/ElsaServerAndStudio.Dockerfile

37 lines
1.2 KiB
Docker
Raw Normal View History

2023-11-27 19:03:50 +00:00
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
2022-12-30 18:29:34 +00:00
WORKDIR /source
2023-12-04 13:25:34 +00:00
# copy sources.
2022-12-30 18:29:34 +00:00
COPY src/. ./src
COPY ./NuGet.Config ./
2022-12-30 18:29:34 +00:00
COPY *.props ./
2023-12-04 13:25:34 +00:00
# restore packages.
RUN dotnet restore "./src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj"
RUN dotnet restore "./src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj"
2023-12-04 13:25:34 +00:00
# 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 net8.0
2022-12-30 18:29:34 +00:00
2023-12-04 13:25:34 +00:00
# move binaries into smaller base image.
2023-11-27 19:20:22 +00:00
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
2022-12-30 18:29:34 +00:00
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
Add OpenTelemetry module (#5810) * Add OpenTelemetry integration for workflow tracing Introduced a new module, Elsa.OpenTelemetry, to provide OpenTelemetry sources for tracing workflow and activity execution. Updated various components and pipeline extensions to support OpenTelemetry tracing throughout the workflow execution process. * Refactor workflow execution pipelines Deleted `WorkflowsFeatureExtensions` and migrated methods to `PipelineWorkflowsFeatureExtensions` with added configurability. Enhanced `ActivityExecutionMiddlewareExtensions` and `ActivityExecutionPipelinePipelineBuilder` to support middleware insertion. Added comprehensive tracing to `OpenTelemetryTracingWorkflowExecutionMiddleware`. * Add OpenTelemetry tracing to activity execution Introduced `OpenTelemetryTracingActivityExecutionMiddleware` to capture tracing information for activity execution within workflows. This middleware logs activity execution start and end events, attaching pertinent activity tags. Added extension method to register this middleware in the workflow execution pipeline. * Set `PYTHONNET_PYDLL` consistently and update workflow pipelines Update Dockerfiles to set the `PYTHONNET_PYDLL` environment variable consistently without spaces. Additionally, refactor `Program.cs` to streamline workflow and activity execution pipeline configurations by using the `WithDefaultWorkflowExecutionPipeline` and `WithDefaultActivityExecutionPipeline` methods. * Enhance OpenTelemetry Tracing Middleware Implementation Add missing activity tags and events to improve telemetry data. Simplify middleware installation syntax for both workflow and activity execution tracing pipelines, ensuring consistent and clear tracing across modules.
2024-07-22 12:36:33 +00:00
ENV PYTHONNET_PYDLL=/usr/lib/aarch64-linux-gnu/libpython3.11.so
2022-12-30 18:29:34 +00:00
EXPOSE 80/tcp
EXPOSE 443/tcp
ENTRYPOINT ["dotnet", "Elsa.ServerAndStudio.Web.dll"]