Skip to content

Commit

Permalink
RSPY-518 - Bootstrap Opentelemetry for rs-server-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
vprivat-ads committed Nov 18, 2024
1 parent 38e56e2 commit a6d65f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions services/staging/.github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,23 @@ ENV PYGEOAPI_OPENAPI=/opt/config/openapi.json

# Install the wheel packages in the right order (dependencies first).
# This also installs all the sub-dependencies e.g. fastapi etc ...
RUN cd /tmp/whl && pip install --no-cache-dir rs_server_staging-*.whl
RUN cd /tmp/whl && pip install --no-cache-dir rs_server_common-*.whl rs_server_staging-*.whl

# Final stage. Don't use alpine, it's too different from the build stage.
FROM python:3.11-slim-bookworm

# Install dependencies necessary for execution (e.g. libpq) not compilation (gcc)
RUN \
apt update && \
apt install -y libpq-dev && \
apt install -y libpq-dev libexpat1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

# Copy the whole /usr/local dir (that contains the python installation) from the build stage
COPY --from=builder /usr/local /usr/local

# Install opentelemetry instrumentation packages for dependencies
RUN opentelemetry-bootstrap -a install

# Clean everything
RUN rm -rf /tmp/whl /root/.cache/pip /var/cache/apt/archives /var/lib/apt/lists/*

Expand Down

0 comments on commit a6d65f6

Please sign in to comment.