File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.9-slim as builder
2
-
3
- WORKDIR /app
4
- RUN pip install uv
5
- COPY requirements.txt .
6
- RUN uv pip compile requirements.txt -o requirements.lock
7
- RUN uv pip install --no-cache -r requirements.txt --system
8
-
9
1
FROM python:3.9-slim
10
2
11
3
WORKDIR /app
12
- COPY --from=builder /usr/local /usr/local
13
4
14
- # Copy everything separately to ensure lib directory is copied correctly
5
+ # Install dependencies using standard pip
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Copy application files
15
10
COPY app.py .
16
11
COPY lib ./lib
17
12
COPY static ./static
@@ -21,10 +16,10 @@ COPY templates ./templates
21
16
RUN if [ ! -f lib/__init__.py ]; then touch lib/__init__.py; fi
22
17
23
18
# Set Python path explicitly to include current directory
24
- ENV PYTHONPATH=.
19
+ ENV PYTHONPATH=/app
25
20
ENV PORT=5000
26
21
27
22
EXPOSE 5000
28
23
29
- # Run with explicit module path
30
- CMD ["sh" , "-c" , "cd /app && PYTHONPATH=/app python -m gunicorn --bind 0.0.0.0:$PORT app:app" ]
24
+ # Run with explicit module path
25
+ CMD ["sh" , "-c" , "python -m gunicorn --bind 0.0.0.0:$PORT app:app" ]
You can’t perform that action at this time.
0 commit comments