fix: add virtual environment setup in Dockerfile
This commit is contained in:
@@ -20,12 +20,15 @@ COPY templates/ templates/
|
|||||||
# Create uploads directory
|
# Create uploads directory
|
||||||
RUN mkdir -p static/uploads
|
RUN mkdir -p static/uploads
|
||||||
|
|
||||||
# Install Python dependencies
|
# Create and activate virtual environment, then install dependencies
|
||||||
RUN uv pip install -e .
|
RUN uv venv && \
|
||||||
|
. .venv/bin/activate && \
|
||||||
|
uv pip install -e .
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV FLASK_APP=main.py
|
ENV FLASK_APP=main.py
|
||||||
ENV FLASK_ENV=production
|
ENV FLASK_ENV=production
|
||||||
|
ENV PATH="/app/.venv/bin:$PATH"
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|||||||
Reference in New Issue
Block a user