-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 751 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (22 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.12-slim
# Prevents Python from writing .pyc files and buffering stdout/stderr
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app
# Install system dependencies (for psycopg2, Pillow, etc.; git is needed by
# pip to resolve the greentechhub-* git+https dependencies below)
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
libjpeg-dev \
zlib1g-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy project files
COPY . .
# Default command
CMD ["uvicorn", "src.pyfinbot.pyfinbot:app", "--host", "0.0.0.0", "--port", "8001", "--reload"]