Spaces:
Sleeping
Sleeping
Download Dockerfile from fyliu/Flight-Search: direct link, hf CLI and curl.
- Browser
- Download file 629 Bytes
-
https://huggingface.co/spaces/fyliu/Flight-Search/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/fyliu/Flight-Search/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/fyliu/Flight-Search/resolve/main/Dockerfile
629 Bytes
| # Stage 1: Build frontend | |
| FROM node:22-alpine AS frontend-build | |
| WORKDIR /app/frontend | |
| COPY frontend/package.json frontend/package-lock.json ./ | |
| RUN npm ci | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| # Stage 2: Run backend + serve frontend | |
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Install Python deps | |
| COPY backend/requirements.txt ./backend/ | |
| RUN pip install --no-cache-dir -r backend/requirements.txt | |
| # Copy backend | |
| COPY backend/ ./backend/ | |
| COPY airline_routes.json ./ | |
| # Copy built frontend | |
| COPY --from=frontend-build /app/frontend/dist ./frontend/dist | |
| ENV PORT=7860 | |
| EXPOSE $PORT | |
| CMD uvicorn backend.main:app --host 0.0.0.0 --port $PORT | |