-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
31 lines (28 loc) · 1022 Bytes
/
Dockerfile
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
FROM python:3.13.1-alpine
LABEL org.opencontainers.image.source=https://github.com/tomswartz07/dump1090-db-stream
LABEL org.opencontainers.image.authors="[email protected]"
LABEL description="Docker container to ingest ADS/B data via Dump1090 streams and store it in a PostgreSQL database."
ENV DUMP1090HOST=""
ENV DUMP1090PORT="30003"
ENV PGHOST="localhost"
ENV PGPORT="5432"
ENV PGDATABASE="adsb"
ENV PGSCHEMA="adsb"
ENV PGTABLE="adsb_messages"
ENV PGUSER="postgres"
ENV PGPASSWORD=""
ENV BUFFER_SIZE="10000"
ENV BATCH_SIZE="1"
ENV CONNECT_ATTEMPT_LIMIT="10"
ENV CONNECT_ATTEMPT_DELAY="5.0"
RUN apk update && apk add --no-cache postgresql-client
COPY create_schema.sql .
COPY dump1090-postgres.py .
COPY requirements.txt .
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
ENTRYPOINT ["python", "/dump1090-postgres.py"]
HEALTHCHECK CMD ps aux | grep '[d]ump1090' || exit 1