@@ -61,6 +61,11 @@ FROM base_builder AS http_builder
6161RUN --mount=type=cache,target=~/.cache/uv \
6262 uv sync --no-dev --group http --no-install-project --frozen --no-editable
6363
64+ # Installs requirements to run production http application
65+ FROM base_builder AS socketio_builder
66+ RUN --mount=type=cache,target=~/.cache/uv \
67+ uv sync --no-dev --group socketio --no-install-project --frozen --no-editable
68+
6469# Create the base app with the common python packages
6570FROM base AS base_app
6671USER nonroot
@@ -75,7 +80,14 @@ FROM base_app AS http_app
7580COPY --from=http_builder /venv /venv
7681COPY --chown=nonroot:nonroot src/http_app ./http_app
7782# Run CMD using array syntax, so it's uses `exec` and runs as PID1
78- CMD ["opentelemetry-instrument" , "uvicorn" , "http_app:create_app" , "--host" , "0.0.0.0" , "--port" , "8000" , "--factory" ]
83+ CMD ["opentelemetry-instrument" , "python" , "-m" , "http_app" ]
84+
85+ # Copy the socketio python package and requirements from relevant builder
86+ FROM base_app AS socketio_app
87+ COPY --from=socketio_builder_builder /venv /venv
88+ COPY --chown=nonroot:nonroot src/socketio_app ./socketio_app
89+ # Run CMD using array syntax, so it's uses `exec` and runs as PID1
90+ CMD ["opentelemetry-instrument" , "python" , "-m" , "socketio_app" ]
7991
8092# Copy the dramatiq python package and requirements from relevant builder
8193FROM base_app AS dramatiq_app
0 commit comments