File size: 1,028 Bytes
6a5eb45
5755a92
b2dae2b
 
 
 
 
 
 
b789c96
b2dae2b
 
2e31623
6a5eb45
2e31623
 
 
 
 
 
4488a06
6a5eb45
 
83522a0
2e31623
 
b2dae2b
 
 
 
 
 
5755a92
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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"]