|
| 1 | +# Coolify Deployment Guide |
| 2 | + |
| 3 | +This guide will help you deploy the Stream Deck Icons application to Coolify. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Coolify instance running and accessible |
| 8 | +- GitHub repository with the Stream Deck Icons code |
| 9 | +- Admin access to your GitHub repository (for setting secrets) |
| 10 | + |
| 11 | +## Step 1: Setup GitHub Secrets |
| 12 | + |
| 13 | +1. Go to your GitHub repository |
| 14 | +2. Navigate to Settings > Secrets and Variables > Actions |
| 15 | +3. Add the following secrets: |
| 16 | + - `COOLIFY_WEBHOOK_URL`: Your Coolify webhook URL (get from Coolify project settings) |
| 17 | + - `COOLIFY_TOKEN`: Your Coolify API token (optional, for enhanced security) |
| 18 | + |
| 19 | +## Step 2: Create Coolify Project |
| 20 | + |
| 21 | +1. Log into your Coolify instance |
| 22 | +2. Create a new project |
| 23 | +3. Choose "Git Repository" as the source |
| 24 | +4. Connect your GitHub repository |
| 25 | + |
| 26 | +## Step 3: Configure Deployment |
| 27 | + |
| 28 | +### Option A: Using Docker Compose (Recommended) |
| 29 | +1. In Coolify, select "Docker Compose" as the deployment method |
| 30 | +2. Use the provided `docker-compose.yml` file |
| 31 | +3. Set the build context to the repository root |
| 32 | + |
| 33 | +### Option B: Using Dockerfile |
| 34 | +1. In Coolify, select "Dockerfile" as the deployment method |
| 35 | +2. Use the provided `Dockerfile` |
| 36 | +3. Set the build context to the repository root |
| 37 | + |
| 38 | +## Step 4: Environment Configuration |
| 39 | + |
| 40 | +Set the following environment variables in Coolify: |
| 41 | +- `NODE_ENV=production` |
| 42 | +- `PORT=3000` |
| 43 | + |
| 44 | +## Step 5: Build Settings |
| 45 | + |
| 46 | +Configure the following in Coolify: |
| 47 | +- **Build Command**: `pnpm install && pnpm build` |
| 48 | +- **Start Command**: `pnpm start` |
| 49 | +- **Port**: 3000 |
| 50 | +- **Health Check Path**: `/` |
| 51 | + |
| 52 | +## Step 6: Deploy |
| 53 | + |
| 54 | +### Automatic Deployment (Recommended) |
| 55 | +- Push changes to the `main` branch |
| 56 | +- GitHub Actions will automatically trigger deployment |
| 57 | + |
| 58 | +### Manual Deployment |
| 59 | +- Use the Coolify dashboard to manually trigger deployment |
| 60 | +- Or use the webhook URL directly |
| 61 | + |
| 62 | +## Troubleshooting |
| 63 | + |
| 64 | +### Common Issues |
| 65 | + |
| 66 | +1. **Build fails with pnpm not found** |
| 67 | + - Ensure the Dockerfile is being used correctly |
| 68 | + - Check that Node.js 22 is available |
| 69 | + |
| 70 | +2. **Health check fails** |
| 71 | + - Verify the application is running on port 3000 |
| 72 | + - Check application logs in Coolify |
| 73 | + |
| 74 | +3. **GitHub Actions deployment fails** |
| 75 | + - Verify webhook URL and token are correctly set |
| 76 | + - Check GitHub Actions logs for specific errors |
| 77 | + |
| 78 | +### Logs |
| 79 | + |
| 80 | +To view logs: |
| 81 | +1. Go to your Coolify project |
| 82 | +2. Navigate to the "Logs" tab |
| 83 | +3. Check both build and runtime logs |
| 84 | + |
| 85 | +## Additional Configuration |
| 86 | + |
| 87 | +### Custom Domain |
| 88 | +1. In Coolify, go to your project settings |
| 89 | +2. Add your custom domain in the "Domains" section |
| 90 | +3. Configure SSL certificate (automatic with Let's Encrypt) |
| 91 | + |
| 92 | +### Resource Limits |
| 93 | +- **Memory**: 512MB minimum (1GB recommended) |
| 94 | +- **CPU**: 1 core minimum |
| 95 | +- **Storage**: 2GB minimum |
| 96 | + |
| 97 | +## Support |
| 98 | + |
| 99 | +If you encounter issues: |
| 100 | +1. Check the Coolify documentation |
| 101 | +2. Review the application logs |
| 102 | +3. Verify all environment variables are set correctly |
| 103 | +4. Ensure the webhook URL is correct and accessible |
0 commit comments