Deployment Overview
Learn how to deploy the GKIT Digital Signage App to production.
Deployment Options
The app can be deployed to:
- Firebase Hosting (Recommended) - Fast, global CDN
- Google Cloud Run - Container-based deployment
- Vercel/Netlify - Alternative static hosting
Firebase Hosting (Recommended)
Why Firebase Hosting?
✅ Optimized for Firebase apps
✅ Global CDN - Fast worldwide
✅ Free SSL certificates
✅ Simple deployment with CLI
✅ Custom domains supported
✅ Automatic HTTPS redirect
Prerequisites
- Firebase project created
- Firebase CLI installed
- Project configured (see Configuration Guide)
Step 1: Install Firebase CLI
Step 2: Login to Firebase
Step 3: Initialize Firebase (if not done)
Select:
- Hosting (use spacebar to select)
- Choose your project
- Build directory: dist
- Single-page app: Yes
- GitHub deploys: Optional
Step 4: Build the App
This creates optimized production files in the dist/ folder.
Step 5: Deploy
You'll see output like:
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/your-project/overview
Hosting URL: https://your-project.web.app
Custom Domain
Add Your Domain
- Go to Firebase Console → Hosting
- Click Add custom domain
- Enter your domain (e.g.,
display.yourclub.com) - Follow DNS verification steps
- Add the provided DNS records to your registrar
Firebase will automatically provision SSL certificates.
Deployment Checklist
Before deploying to production:
- [ ] Update Firebase config with production keys
- [ ] Set
USE_FIREBASE = true - [ ] Configure Firestore security rules
- [ ] Enable Firebase Authentication
- [ ] Test all features locally
- [ ] Build succeeds without errors
- [ ] Set up custom domain (optional)
- [ ] Configure monitoring/analytics
Environment-Specific Configs
Development
Production
Continuous Deployment (Optional)
GitHub Actions
Create .github/workflows/deploy.yml:
name: Deploy to Firebase Hosting
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm ci
- run: npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: live
projectId: your-project-id
Monitoring
Firebase Analytics
Enable in Firebase Console: 1. Go to Analytics 2. Click Enable Analytics 3. Choose data sharing settings
Error Monitoring
Consider adding Sentry:
Configure in main.tsx:
import * as Sentry from "@sentry/react";
Sentry.init({
dsn: "your-sentry-dsn",
environment: "production"
});
Rollback
If you need to rollback a deployment:
Or restore from Firebase Console → Hosting → Release history.
Next Steps
Troubleshooting
Build fails
Check: - Node version (must be 18+) - Dependencies installed correctly - No TypeScript errors
Deploy succeeds but app shows errors
Check: - Firebase config is correct in production - Firestore security rules allow reads - Authentication is configured
Slow loading
- Ensure Firebase Hosting is used (global CDN)
- Check bundle size:
npm run build -- --report - Consider code splitting for large apps