Infra: Add Dockerfile for Python environment
Some checks failed
Agile Squad Operations / standup-check (push) Failing after 32s
Agile Squad Operations / scrum-report (push) Failing after 26s
Agile Squad Operations / heavy-worker (push) Has been cancelled
Agile Squad Operations / qa-auditor (push) Has been cancelled

This commit is contained in:
serhiimosiiash
2025-12-19 19:55:06 +02:00
parent 2d371a94df
commit db58a17efe
2 changed files with 10 additions and 8 deletions

View File

@@ -1,15 +1,18 @@
FROM python:3.9-slim
FROM python:3.10-slim
# Встановлюємо робочу директорію
WORKDIR /app
# Встановлюємо бібліотеки для Postgres
RUN apt-get update && apt-get install -y libpq-dev gcc && rm -rf /var/lib/apt/lists/*
# Встановлюємо системні залежності (якщо треба для audit)
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Залежності
# Копіюємо залежності та встановлюємо їх
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Якщо файл порожній або його немає, pip не впаде завдяки "|| true"
RUN pip install --no-cache-dir -r requirements.txt || true
# Код
# Копіюємо весь код проекту
COPY . .
CMD ["python", "main.py"]
# За замовчуванням запускаємо help
CMD ["python", "main.py", "--help"]