feat(backend): add FastAPI backend — procurement, inventory domain, Casdoor auth, PM arrival endpoints

This commit is contained in:
ali_mohaghegh
2026-08-25 19:08:14 +03:30
parent c8a9b66395
commit 170aed66ea
67 changed files with 9774 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# Backend image — FastAPI + SQLAlchemy async (asyncpg)
# The PostgreSQL schema is managed by the postgres service (migration.sql +
# seed.sql init scripts); this image only runs the API.
FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /srv/backend
# Dependencies first (layer caching)
# PIP_INDEX_URL overridable (e.g. a China mirror) — default is official PyPI.
ARG PIP_INDEX_URL=https://pypi.org/simple
COPY requirements.txt .
RUN pip install --no-cache-dir -i ${PIP_INDEX_URL} -r requirements.txt
# Application
COPY app ./app
COPY tools ./tools
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]