Revert LICENSE and README.md changes, update Dockerfile to use multi-stage build with uv

Co-authored-by: nikdoof <170514+nikdoof@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-17 17:20:13 +00:00
parent 59aadd22c1
commit 816ef7fd06
3 changed files with 50 additions and 33 deletions

View File

@@ -1,16 +1,22 @@
FROM python:3.9-alpine
FROM python:3.9-alpine AS base
# Builder
FROM base AS builder
# Install uv
# Note: In some build environments, you may need to add --trusted-host flags for SSL
RUN pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org uv
RUN pip install uv
WORKDIR /app
COPY uv.lock pyproject.toml README.md /app/
COPY smsbot /app/smsbot
WORKDIR /src
COPY uv.lock pyproject.toml README.md /src/
COPY smsbot /src/smsbot
# Install dependencies
# Note: In some environments, you may need to configure SSL certificates
# Create virtual environment and install dependencies
RUN uv sync --frozen --no-dev
# Final container
FROM base AS runtime
COPY --from=builder /src/.venv /runtime
ENV PATH=/runtime/bin:$PATH
EXPOSE 80/tcp
CMD ["uv", "run", "smsbot"]
CMD ["smsbot"]