-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.10-slim@sha256:3be54aca807a43b5a1fa2133b1cbb4b58a018d6ebb1588cf1050b7cbebf15d55
RUN apt update && apt install -y postgresql-server-dev-all build-essential gcc
# Set our environment variables
## OTEL Endpoint, defaults to localhost via HTTP
ENV OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
ENV OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
ENV OTEL_EXPORTER_OTLP_HEADERS=""
## What do we want the service name to be called (defaults to "sensor_manager")
ENV SERVICE_NAME="sensor_manager"
ENV TTN_WEBHOOK_TOKEN=""
ENV TTN_APP_KEY=""
ENV TTN_ADMIN_KEY=""
ENV TTN_APP_NAME=""
# DJANGO SETTINGS
ENV DJANGO_SECRET_KEY=""
ENV DJANGO_DEBUG="False"
ENV DJANGO_SETTINGS_MODULE=sensors.settings
ENV DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
WORKDIR /usr/app
RUN pip install poetry
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root
RUN apt remove -y postgresql-server-dev-all build-essential gcc
COPY . .
RUN touch /usr/app/config.yaml
EXPOSE 8000
CMD exec poetry run opentelemetry-instrument --traces_exporter console,otlp --metrics_exporter console,otlp --logs_exporter console,otlp --service_name ${SERVICE_NAME} python ./manage.py runserver 0.0.0.0:8000 --noreload