✅ Dockerfile - Production-ready Docker configuration
✅ .dockerignore - Optimized Docker builds
✅ .env file - Environment variables (gitignored)
✅ venv/ - Virtual environment (gitignored)
✅ railway.json - Updated to use Dockerfile
✅ Procfile - Removed (using Dockerfile instead)
✅ .gitignore - Updated to exclude venv/ and .env
- Uses Python 3.11 slim image
- Installs all dependencies from requirements.txt
- Exposes port 8000 (Railway will override with $PORT)
- Runs uvicorn server
Excludes unnecessary files from Docker build:
- Git files
- Virtual environment
- Environment files
- IDE files
- Test files
Railway will:
- Detect Dockerfile automatically
- Build Docker image
- Run container with environment variables
- Expose on Railway's domain
Set these in Railway dashboard:
OPENAI_API_KEY(required)DEFAULT_HOURLY_RATE(optional)BUFFER_PERCENTAGE(optional)OPENAI_MODEL(optional)
# Build image
docker build -t estimation-bot .
# Run container
docker run -p 8000:8000 --env-file .env estimation-bot
# Or with environment variables directly
docker run -p 8000:8000 -e OPENAI_API_KEY=your_key estimation-bot- Push code to GitHub
- Connect Railway to GitHub repo
- Railway detects Dockerfile
- Set environment variables
- Deploy!
All files are properly configured:
- ✅ Dockerfile exists
- ✅ .dockerignore exists
- ✅ .env exists (gitignored)
- ✅ venv/ exists (gitignored)
- ✅ Procfile removed
- ✅ railway.json uses Dockerfile