File size: 1,414 Bytes
67f25fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Create railway.json for Railway deployment
railway_config = {
    "$schema": "https://railway.app/railway.schema.json",
    "build": {
        "builder": "DOCKERFILE",
        "dockerfilePath": "Dockerfile.standalone"
    },
    "deploy": {
        "startCommand": "streamlit run app.py --server.port $PORT --server.address 0.0.0.0 --server.enableCORS false --server.enableXsrfProtection false",
        "healthcheckPath": "/_stcore/health",
        "healthcheckTimeout": 100,
        "restartPolicyType": "ON_FAILURE",
        "restartPolicyMaxRetries": 10
    }
}

# Create render.yaml for Render deployment
render_config = """
services:
  - type: web
    name: multilingual-translator
    env: docker
    dockerfilePath: ./Dockerfile.standalone
    plan: starter
    healthCheckPath: /_stcore/health
    envVars:
      - key: PORT
        value: 8501
      - key: PYTHONUNBUFFERED
        value: 1
"""

# Create Procfile for Heroku deployment
procfile_content = "web: streamlit run app.py --server.port $PORT --server.address 0.0.0.0 --server.enableCORS false --server.enableXsrfProtection false"

# Create .platform for AWS Elastic Beanstalk
platform_hooks = """
option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: app.py
  aws:elasticbeanstalk:application:environment:
    PYTHONPATH: /var/app/current
"""

print("Platform configuration files created automatically by deploy.sh script")