tracksolid_timescale_grafan.../Dockerfile

31 lines
817 B
Docker
Raw Permalink Normal View History

2026-04-07 18:34:40 +00:00
# Use a slim Python image
FROM python:3.12-slim
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Install system dependencies (Required for Postgres and Healthchecks)
RUN apt-get update && apt-get install -y \
libpq5 \
postgresql-client \
2026-04-07 18:34:40 +00:00
curl \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy dependency files
COPY pyproject.toml .
# COPY uv.lock . # Uncomment this once you have generated a lockfile locally
# Install dependencies into a system-wide environment
RUN uv pip install --system -r pyproject.toml
# Copy the rest of the application
COPY . .
# Security: Run as a non-privileged user (standard for 24/7 telemetry)
RUN useradd -m telemetry-user
USER telemetry-user
# CMD is handled by docker-compose.yml to differentiate movement vs events