File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525
2626 - name : Run backend tests
2727 run : |
28- cd backend
29- pytest -v tests/
28+ pytest -v backend/tests/
3029
3130 deploy :
3231 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ # === HTTPS Server ===
2+ server {
3+ listen 443 ssl ;
4+ server_name kh_detection.com www.kh_detection.com;
5+
6+ # SSL Certificates
7+ ssl_certificate /etc/nginx/ssl /selfsigned.crt;
8+ ssl_certificate_key /etc/nginx/ssl /selfsigned.key;
9+
10+ ssl_protocols TLSv1.2 TLSv1.3;
11+ ssl_ciphers HIGH:!aNULL:!MD5;
12+
13+ # === Frontend (React) ===
14+ root /home/ny/projects/final/frontend/build; # <- use /build for React production build
15+ index index .html;
16+
17+ # Serve React app
18+ location / {
19+ try_files $uri /index .html;
20+ }
21+
22+ # === Backend (FastAPI) ===
23+ location /api/ {
24+ proxy_pass http ://127.0.0.1:8000 /;
25+ proxy_set_header Host $host ;
26+ proxy_set_header X-Real-IP $remote_addr ;
27+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
28+ proxy_set_header X-Forwarded-Proto $scheme ;
29+ }
30+
31+ # Optional: handle CORS or large payloads
32+ client_max_body_size 20M ;
33+ }
34+
35+ # === HTTP → HTTPS Redirect ===
36+ server {
37+ listen 80 ;
38+ server_name kh_detection.com www.kh_detection.com;
39+ return 301 https://$host$request_uri ;
40+ }
You can’t perform that action at this time.
0 commit comments