diff --git a/backend/Procfile b/backend/Procfile new file mode 100644 index 0000000..c3e3500 --- /dev/null +++ b/backend/Procfile @@ -0,0 +1 @@ +web: gunicorn -w 4 -b 0.0.0.0:$PORT run:app diff --git a/frontend/vercel.json b/frontend/vercel.json new file mode 100644 index 0000000..a663dfc --- /dev/null +++ b/frontend/vercel.json @@ -0,0 +1,16 @@ +{ + "rewrites": [ + { + "source": "/api/(.*)", + "destination": "https://aipcss-backend.onrender.com/api/$1" + }, + { + "source": "/socket.io/(.*)", + "destination": "https://aipcss-backend.onrender.com/socket.io/$1" + }, + { + "source": "/(.*)", + "destination": "/index.html" + } + ] +} diff --git a/render.yaml b/render.yaml new file mode 100644 index 0000000..f55395a --- /dev/null +++ b/render.yaml @@ -0,0 +1,24 @@ +services: + - type: web + name: aipcss-backend + env: python + rootDir: backend + buildCommand: pip install -r requirements.txt + startCommand: gunicorn -w 4 -b 0.0.0.0:$PORT run:app + envVars: + - key: FLASK_ENV + value: production + - key: SECRET_KEY + generateValue: true + - key: JWT_SECRET_KEY + generateValue: true + - key: DATABASE_URL + fromDatabase: + name: aipcss-db + property: connectionString + - key: CORS_ORIGINS + value: "*" + + - type: psql + name: aipcss-db + plan: free