Migrate geo backend from Django/Graphene to Express + Apollo Server + arangojs
All checks were successful
Build Docker Image / build (push) Successful in 1m5s

Replace Python stack with TypeScript. All 30+ GraphQL queries preserved including
phase-based routing (Dijkstra), H3 clustering, K_SHORTEST_PATHS, and external
routing services (GraphHopper, OpenRailRouting). Single public endpoint, no auth.
This commit is contained in:
Ruslan Bakiev
2026-03-09 09:45:22 +07:00
parent 31fc8cbc34
commit 52cbed91f8
30 changed files with 5162 additions and 3529 deletions

View File

@@ -1,24 +1,23 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
NIXPACKS_POETRY_VERSION=2.2.1
FROM node:22-alpine AS builder
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential curl \
&& rm -rf /var/lib/apt/lists/*
COPY package.json ./
RUN npm install
RUN python -m venv --copies /opt/venv
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY tsconfig.json ./
COPY src ./src
RUN npm run build
COPY . .
FROM node:22-alpine
RUN pip install --no-cache-dir poetry==$NIXPACKS_POETRY_VERSION \
&& poetry install --no-interaction --no-ansi
WORKDIR /app
ENV PORT=8000
COPY package.json ./
RUN npm install --omit=dev
CMD ["sh", "-c", "poetry run python manage.py collectstatic --noinput && poetry run python -m gunicorn geo.wsgi:application --bind 0.0.0.0:${PORT:-8000}"]
COPY --from=builder /app/dist ./dist
EXPOSE 8000
CMD ["node", "dist/index.js"]