Initial commit
This commit is contained in:
24
backup 24.2.26 - Kopie (61)/deploy/Dockerfile
Normal file
24
backup 24.2.26 - Kopie (61)/deploy/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# System deps (minimal)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy project
|
||||
COPY . /app
|
||||
|
||||
# Install python deps (best effort):
|
||||
# - If requirements.txt exists, use it.
|
||||
# - Otherwise install minimal runtime.
|
||||
RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; \
|
||||
else pip install --no-cache-dir fastapi uvicorn stripe pydantic; fi
|
||||
|
||||
# Ensure data folder exists
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python", "-m", "uvicorn", "backend_main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user