From a28b7702a9fd3f1e6e7fad6afc0078e47b654340 Mon Sep 17 00:00:00 2001 From: Atharv1705 Date: Mon, 21 Sep 2026 11:12:15 +0530 Subject: [PATCH] chore: Update configs for new Contabo VPS (aicpa.duckdns.org / 13.140.170.213) --- docker-compose.yml | 12 +++++++++++- nginx/default.conf | 7 ++++++- services/api/app/main.py | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 97e0d2c..51f5b60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,13 @@ services: nginx: image: nginx:1.25-alpine ports: - - "127.0.0.1:8081:80" + - "80:80" + - "443:443" volumes: - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro - ./frontend/dist:/usr/share/nginx/html:ro + - ./certbot/conf:/etc/letsencrypt + - ./certbot/www:/var/www/certbot depends_on: - app restart: unless-stopped @@ -39,6 +42,13 @@ services: restart: unless-stopped + certbot: + image: certbot/certbot + volumes: + - ./certbot/conf:/etc/letsencrypt + - ./certbot/www:/var/www/certbot + entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" + db: image: mysql:8.4 diff --git a/nginx/default.conf b/nginx/default.conf index f1c2e4f..2c29ba0 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,6 +1,6 @@ server { listen 80; - server_name aiindiacpa.duckdns.org 147.93.168.145; + server_name aicpa.duckdns.org 13.140.170.213; @@ -12,6 +12,11 @@ server { # Max upload size — matches backend 10MB limit with buffer client_max_body_size 15m; + # ── Certbot ACME Challenge ─────────────────────────────────────────────── + location /.well-known/acme-challenge/ { + root /var/www/certbot; + } + # ── Static CSS (served directly from dist, no FastAPI hop) ─────────────── location /css/ { root /usr/share/nginx/html; diff --git a/services/api/app/main.py b/services/api/app/main.py index e31661a..d8dca0a 100644 --- a/services/api/app/main.py +++ b/services/api/app/main.py @@ -89,7 +89,7 @@ _ALLOWED_ORIGINS = [ o.strip() for o in os.getenv( "ALLOWED_ORIGINS", - "https://aiindiacpa.duckdns.org", + "https://aicpa.duckdns.org", ).split(",") if o.strip() ]