-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from Amsterdam/yrob/otel_instrumentation
Yrob/otel instrumentation
- Loading branch information
Showing
5 changed files
with
93 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,50 @@ | ||
FROM amsterdam/python:3.9-buster | ||
FROM python:3.9-buster as builder | ||
MAINTAINER [email protected] | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN apt update && apt install --no-install-recommends -y \ | ||
curl \ | ||
gdal-bin \ | ||
libgeos-c1v5 \ | ||
libpq5 \ | ||
netcat-openbsd \ | ||
build-essential \ | ||
libgeos-dev \ | ||
libpq-dev \ | ||
python3-dev \ | ||
libffi-dev | ||
|
||
WORKDIR /app/ | ||
|
||
COPY requirements.txt /app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Start runtime image | ||
FROM python:3.9-buster | ||
RUN apt update && apt install --no-install-recommends -y \ | ||
gdal-bin \ | ||
libgeos-c1v5 \ | ||
libpq5 \ | ||
netcat-openbsd | ||
|
||
# Copy python build artifacts from builder image | ||
COPY --from=builder /usr/local/bin/ /usr/local/bin/ | ||
COPY --from=builder /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/site-packages/ | ||
|
||
RUN adduser --system datapunt | ||
|
||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ARG BAG_OBJECTSTORE_PASSWORD | ||
ENV BAG_OBJECTSTORE_PASSWORD=$BAG_OBJECTSTORE_PASSWORD | ||
|
||
EXPOSE 8080 | ||
|
||
WORKDIR /app/ | ||
COPY requirements.txt /app/ | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install -r requirements.txt | ||
RUN chown datapunt -R /app | ||
EXPOSE 8080 | ||
|
||
|
||
RUN mkdir -p /static && chown datapunt /static | ||
|
||
|
@@ -25,4 +59,3 @@ ENV BAG_SECRET_KEY=insecure | |
RUN ./manage.py collectstatic | ||
|
||
CMD /app/docker-entrypoint.sh | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters