fix: Add proxy configuration in Dockerfile and remove hardcoded environment variables
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 12s
Deploy to Server / deploy (push) Failing after 3s

This commit is contained in:
2025-10-23 19:38:22 +02:00
parent 93a2f54f97
commit f864ad563a

View File

@@ -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