-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 1009 Bytes
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 1009 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
29
30
31
32
33
34
35
36
37
38
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy core artifacts (for ABI loading — includes VeriSphereForwarder)
COPY core/out /core/out
# Create and activate virtual environment
RUN python -m venv /venv
ENV PATH="/venv/bin:$PATH"
# Copy and install requirements
COPY app/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Explicit fallback installs
RUN pip install --no-cache-dir sqlalchemy python-dotenv psycopg2-binary
# Verify key packages are installed
RUN pip list | grep -E "sqlalchemy|python-dotenv|psycopg2" || exit 1
# Copy application code
COPY app/ /app/
COPY app/ops ./ops
EXPOSE 8070
# Use /bin/sh instead of bash (slim image doesn't have bash)
CMD ["/bin/sh", "-c", "python migrate.py && /venv/bin/uvicorn main:app --host 0.0.0.0 --port 8070"]