From f864ad563a1e155c018e640c828240249f802166 Mon Sep 17 00:00:00 2001 From: zwitschi Date: Thu, 23 Oct 2025 19:38:22 +0200 Subject: [PATCH] fix: Add proxy configuration in Dockerfile and remove hardcoded environment variables --- Dockerfile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index db79a39..3791ba8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM python:3.10-slim AS builder # Install build-time packages and Python dependencies in one layer WORKDIR /app COPY requirements.txt /app/requirements.txt +RUN echo 'Acquire::http::Proxy "http://192.168.88.14:3142";' > /etc/apt/apt.conf.d/90proxy RUN apt-get update \ && apt-get install -y --no-install-recommends build-essential gcc libpq-dev \ && python -m pip install --upgrade pip \ @@ -18,15 +19,7 @@ WORKDIR /app COPY --from=builder /install /usr/local # Production environment variables -ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 \ - DATABASE_DRIVER=postgresql \ - DATABASE_HOST=localhost \ - DATABASE_PORT=5432 \ - DATABASE_USER=calminer \ - DATABASE_PASSWORD=changeme \ - DATABASE_NAME=calminer \ - DATABASE_SCHEMA=public +COPY .env /app/.env # Copy application code COPY . /app