Files
ciaovolo/flight-comparator/Dockerfile.backend
domverse cdb8c20e82 ci: switch from GitLab CI to Gitea Actions, fix Dockerfile.backend
- Replace .gitlab-ci.yml with .gitea/workflows/deploy.yml
- Fix Dockerfile.backend: add scan_processor.py and searcher_v3.py to
  COPY command (they were missing, would cause runtime ImportError)
- Update docker-compose.yml comment to reference Gitea workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 11:42:02 +01:00

31 lines
879 B
Docker

FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY api_server.py airports.py cache.py scan_processor.py searcher_v3.py ./
COPY database/ ./database/
# Pre-fetch airport data and initialise the database at build time
RUN mkdir -p data && \
python -c "from airports import download_and_build_airport_data; download_and_build_airport_data()" && \
python database/init_db.py
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
CMD ["python", "api_server.py"]