86 lines
1.9 KiB
Markdown
86 lines
1.9 KiB
Markdown
# Railway Setup - Quick Reference
|
|
|
|
## One-Command Deploy
|
|
|
|
```bash
|
|
npm i -g @railway/cli && railway login && railway up
|
|
```
|
|
|
|
## Manual Steps
|
|
|
|
1. **Create Project on Railway**
|
|
- Go to https://railway.app/dashboard
|
|
- Click "New Project" → "Deploy from GitHub"
|
|
- Select your `aethex.live` repository
|
|
|
|
2. **Add Environment Variables**
|
|
- Project Settings → Variables
|
|
- Add: `NEXT_PUBLIC_STREAM_URL=your-hls-url.m3u8`
|
|
- Save
|
|
|
|
3. **Wait for Deployment**
|
|
- Railway auto-builds and deploys
|
|
- Check Deployments tab for status
|
|
- Live URL appears when ready
|
|
|
|
4. **Add Custom Domain**
|
|
- Settings → Domains
|
|
- Add `aethex.live`
|
|
- Update DNS records (CNAME)
|
|
|
|
## Environment Variables Needed
|
|
|
|
**Required:**
|
|
```
|
|
NEXT_PUBLIC_STREAM_URL=your-hls-stream-url.m3u8
|
|
```
|
|
|
|
**Optional (backend features):**
|
|
```
|
|
DATABASE_URL=postgresql://... # if using database
|
|
NEXTAUTH_URL=https://aethex.live # if using auth
|
|
NEXTAUTH_SECRET=random-secret-key # if using auth
|
|
```
|
|
|
|
## Test Your Deployment
|
|
|
|
```bash
|
|
# Via Railway CLI
|
|
railway open
|
|
|
|
# Or visit the URL provided in Railway Dashboard
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
| Issue | Fix |
|
|
|-------|-----|
|
|
| Build fails | Check build logs in Railway dashboard |
|
|
| Stream won't load | Verify `NEXT_PUBLIC_STREAM_URL` is set |
|
|
| Domain not working | Wait 24hrs for DNS, check CNAME record |
|
|
| App keeps crashing | View logs, check if PORT=3000 is used |
|
|
|
|
## Useful Railway CLI Commands
|
|
|
|
```bash
|
|
railway login # Login to Railway
|
|
railway up # Deploy current project
|
|
railway logs # View live logs
|
|
railway variables set KEY=value # Set env var
|
|
railway open # Open project in browser
|
|
railway status # Check deployment status
|
|
```
|
|
|
|
## Next Time You Deploy
|
|
|
|
Just push to GitHub and Railway auto-deploys! Or:
|
|
|
|
```bash
|
|
railway up
|
|
```
|
|
|
|
---
|
|
|
|
**Your stream is live on Railway!** 🚀
|
|
|
|
For more: See `RAILWAY_DEPLOYMENT.md` or visit https://docs.railway.app
|