docs: Add Docker deployment instructions and build script
- Add build-and-push-docker.ps1 PowerShell script for automated Docker builds - Update README.md with comprehensive Docker deployment guide - Include environment variable configuration - Document automated email scheduling in containers - Add GitHub Container Registry push instructions
This commit is contained in:
1 parent
d9784738e4
commit
27d02596d1
3 files changed
+91
No files matched your search
@@ -244,6 +244,62 @@ npm run build
|
||||
|
||||
Deploy to Vercel or any platform supporting Next.js PWAs.
|
||||
|
||||
## Docker Deployment
|
||||
|
||||
The app includes Docker support for containerized deployment with automated email scheduling.
|
||||
|
||||
### Build and Push Docker Image
|
||||
|
||||
1. **Using the automated script (Windows):**
|
||||
```powershell
|
||||
.\build-and-push-docker.ps1
|
||||
```
|
||||
This script will:
|
||||
- Build the Docker image
|
||||
- Prompt for your GitHub Personal Access Token
|
||||
- Login to GitHub Container Registry
|
||||
- Push the image
|
||||
|
||||
2. **Manual build and push:**
|
||||
```bash
|
||||
# Build the image
|
||||
docker build -t ghcr.io/nmemmert/prayer-app:latest .
|
||||
|
||||
# Login to GitHub Container Registry
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u nmemmert --password-stdin
|
||||
|
||||
# Push the image
|
||||
docker push ghcr.io/nmemmert/prayer-app:latest
|
||||
```
|
||||
|
||||
### Run with Docker Compose
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
The container includes:
|
||||
- Automated email scheduling (runs every 5 minutes)
|
||||
- Health checks
|
||||
- Production-optimized Next.js build
|
||||
- Cron jobs for scheduled tasks
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Set these environment variables for the container:
|
||||
|
||||
```bash
|
||||
# Firebase Admin SDK (required for server-side operations)
|
||||
FIREBASE_PROJECT_ID=your_project_id
|
||||
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n..."
|
||||
FIREBASE_CLIENT_EMAIL=your_service_account_email
|
||||
|
||||
# EmailJS (for client-side emails)
|
||||
NEXT_PUBLIC_EMAILJS_SERVICE_ID=your_service_id
|
||||
NEXT_PUBLIC_EMAILJS_TEMPLATE_ID=your_template_id
|
||||
NEXT_PUBLIC_EMAILJS_PUBLIC_KEY=your_public_key
|
||||
```
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
Reference in new issue
Block a user