Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sattwyk committed Nov 5, 2024
1 parent f13d235 commit a512d65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use the official Python image as the base image
FROM python:3.10-slim-bookworm AS base

# Install uv
# Copy uv binaries
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Set environment variables
Expand All @@ -15,17 +15,17 @@ ENV PORT=8080
# Set the working directory
WORKDIR /app

# Copy only the necessary files for dependency installation
# Copy dependency files for installation
COPY pyproject.toml uv.lock ./

# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --system -r pyproject.toml

# Copy the rest of the application code
# Copy the main application file
COPY bot.py ./

# Compile bytecode
# Compile bytecode (this step might be redundant if UV_COMPILE_BYTECODE is set)
RUN python -m compileall .

# Expose the port the app runs on
Expand Down

0 comments on commit a512d65

Please sign in to comment.