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