Spaces:
Sleeping

File size: 1,559 Bytes
0b355ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
services:
  # Backend API Service
  - type: web
    name: edichat-backend
    runtime: node
    repo: https://github.com/edichat-llc/edi.chat.test
    buildCommand: cd backend && npm install
    startCommand: cd backend && npm start
    envVars:
      - key: NODE_ENV
        value: production
      - key: PORT
        value: 5000
      - key: FRONTEND_URL
        value: https://edi.chat
      - key: BACKEND_URL
        value: https://edichat-backend.onrender.com
      - key: USE_LOCAL_AI
        value: false  # Ollama not available on Render
      - key: MONGODB_URI
        fromDatabase:
          name: edichat-mongodb
          property: connectionString
      - key: JWT_SECRET
        generateValue: true
      - key: JWT_REFRESH_SECRET
        generateValue: true
    healthCheckPath: /api/health
    domains:
      - api.edi.chat

  # Frontend Static Site
  - type: web
    name: edichat-frontend
    runtime: static
    repo: https://github.com/edichat-llc/edi.chat.test
    buildCommand: cd frontend && npm install && npm run build
    staticPublishPath: frontend/build
    headers:
      - path: /*
        name: X-Frame-Options
        value: SAMEORIGIN
      - path: /*
        name: X-Content-Type-Options
        value: nosniff
    routes:
      - type: rewrite
        source: /*
        destination: /index.html
    domains:
      - edi.chat
      - www.edi.chat

# Optional: Database (if not using MongoDB Atlas)
databases:
  - name: edichat-mongodb
    plan: free # or 'starter' for $7/month
    databaseName: edichat
    user: edichat