# Render.com infrastructure-as-code untuk KozyNear deploy (Docker single-container). # # Service naming: # - kozynear-db (internal PostgreSQL, no public URL) # - kozynear -> https://kozynear.onrender.com (Docker container, # serve React frontend + FastAPI API + Swagger) # # Push ke main branch -> Render auto-deploy 2 services (down from 3). # # Setup: # 1. Connect repo ke Render account # 2. New "Blueprint" -> pilih repo -> Render baca render.yaml ini # 3. Confirm settings -> Apply # # Catatan free tier: # - PostgreSQL: 1GB storage, expire 90 hari setelah create # - Web Service (Docker): 512MB RAM, spin down 15 menit idle (cold start ~30s) databases: - name: kozynear-db region: singapore plan: free databaseName: kozynear user: kozynear_user services: # --------------------------------------------------------------------------- # KozyNear single container (frontend + backend + IR engine) # --------------------------------------------------------------------------- - type: web name: kozynear runtime: docker region: singapore plan: free dockerfilePath: ./Dockerfile dockerContext: . healthCheckPath: /health envVars: - key: DATABASE_URL fromDatabase: name: kozynear-db property: connectionString - key: ENVIRONMENT value: production - key: ENABLE_NEURAL value: "false" # 512MB: neural off; HF Spaces (16GB) set true - key: INDEXES_DIR value: /app/data/indexes - key: EMBEDDING_MODEL value: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 - key: LOG_LEVEL value: INFO # CORS: same-origin di production, gak perlu config. Tapi tetap allow # localhost dev biar consistent. - key: CORS_ORIGINS value: '["http://localhost:5173","http://localhost:3000"]'