Spaces:
Runtime error
Runtime error
| # syntax=docker/dockerfile:1.4 | |
| FROM python:3.12 | |
| ENV PYTHONDONTWRITEBYTECODE 1 | |
| ENV PYTHONUNBUFFERED 1 | |
| RUN apt-get update && apt-get install -y \ | |
| git openssh-client && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Generate SSH Key and Show Public Key | |
| RUN ssh-keygen -t ed25519 -N "" -f /root/.ssh/id_ed25519 && \ | |
| echo "========================" && \ | |
| echo "ADD THIS PUBLIC KEY TO YOUR GITHUB REPO (DEPLOY KEYS):" && \ | |
| cat /root/.ssh/id_ed25519.pub && \ | |
| echo "========================" && \ | |
| echo "Waiting 120 seconds for manual key deployment..." && \ | |
| sleep 120 | |
| # Add GitHub to known_hosts | |
| RUN ssh-keyscan github.com >> /root/.ssh/known_hosts | |
| # Clone repo (after you’ve added the deploy key) | |
| RUN git clone --branch coolify --single-branch git@github.com:Fvt-second/Giftx_api.git /app | |
| RUN pip install --upgrade pip | |
| RUN if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"] | |