Translation_app_ / platform_configs.py
Athena1621's picture
feat: Implement Multi-Lingual Product Catalog Translator frontend with Streamlit
67f25fb
# 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")