update dockerfile

This commit is contained in:
2026-01-28 15:23:33 +03:00
parent 8ec622c427
commit a7bb6db060

View File

@ -1,19 +1,12 @@
FROM python:3.12-slim
FROM python:3.12.7-alpine
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
ADD https://github.com/astral-sh/uv/releases/download/0.9.27/uv-installer.sh /uv-installer.sh
RUN sh /uv-installer.sh
ENV PATH="/root/.cargo/bin/:$PATH"
# Copy project files
COPY pyproject.toml ./
COPY . .
# Install Python dependencies
RUN pip install --no-cache-dir uv && \
uv pip install --system -e .
# Run the bot
CMD ["python", "main.py"]
ADD pyproject.toml .
ADD uv.lock .
RUN uv sync --frozen
ADD . .
CMD ["/root/.cargo/bin/uv", "run", "python", "/app/bot.py"]