This project uses the same code in test and production. Only Railway variables differ.
Canonical variable definitions live in ENVIRONMENT_VARIABLES.md. Use this file as the Railway-specific runbook.
Set these in the Railway test environment:
ENVIRONMENT=test
DEBUG=false
APP_VERSION=1.0.0
LOG_LEVEL=INFO
DATABASE_URL=$
SQL_ECHO=false
DB_POOL_SIZE=20
DB_MAX_OVERFLOW=10
DB_POOL_TIMEOUT=30
DB_POOL_RECYCLE=3600
FRONTEND_URL=
API_BASE_URL=
CORS_ORIGINS=
CORS_ORIGIN_REGEX=
CORS_ALLOW_CREDENTIALS=true
CORS_ALLOW_METHODS=*
CORS_ALLOW_HEADERS=*
EMAIL_ENABLED=true
ENABLE_EMAILS=true
EMAIL_PROVIDER=mailersend
EMAIL_FROM=info@example.com
EMAIL_FROM_NAME=Open Work Culture
EMAIL_REPLY_TO=info@example.com
MAILERSEND_API_KEY=<set-in-railway-secret>
VERIFICATION_TOKEN_EXPIRY_MINUTES=1440
VERIFICATION_TOKEN_LENGTH=8
MIN_RESPONSES_FOR_PUBLIC_RESULTS=5
MIN_RESPONSES_PER_COMPANY=5
MIN_RESPONSES_PER_LOCATION=5
ENABLE_REPORT_DOWNLOAD=true
ENABLE_AI_ANALYSIS=true
ENABLE_COMPANY_REPORTS=true
ENABLE_BACKGROUND_TASKS=true
OPENAI_API_KEY=
OPENAI_MODEL=gpt-5.5
Use the same variable names as test. Typical production differences:
ENVIRONMENT=production
FRONTEND_URL=
API_BASE_URL=
CORS_ORIGINS=
Use production-only secrets for:
DATABASE_URLMAILERSEND_API_KEYOPENAI_API_KEY (if AI is enabled)ENVIRONMENTFRONTEND_URLAPI_BASE_URLCORS_ORIGINSDATABASE_URLMAILERSEND_API_KEYOPENAI_API_KEYDATABASE_URLRESEND_API_KEYOPENAI_API_KEY.env files are not automatically used by Railway.ENVIRONMENT in Railway service variables.FRONTEND_URL and API_BASE_URL match the intended environment.