Fix Rate Limiting Issues
- Updated Definition of Done report with detailed checks and results for backend and frontend tests. - Documented issues related to race conditions and test failures in QA reports. - Improved security scan notes and code cleanup status in QA reports. - Added summaries for rate limit integration test fixes, including root causes and resolutions. - Introduced new debug and integration scripts for rate limit testing. - Updated security documentation to reflect changes in configuration and troubleshooting steps. - Enhanced troubleshooting guides for CrowdSec and Go language server (gopls) errors. - Improved frontend and scripts README files for clarity and usage instructions.
This commit is contained in:
@@ -8,20 +8,21 @@ This guide will help you set up GitHub Actions for automatic Docker builds and d
|
||||
|
||||
The Docker build workflow uses GitHub Container Registry (GHCR) to store your images. **No setup required!** GitHub automatically provides authentication tokens for GHCR.
|
||||
|
||||
### How It Works:
|
||||
### How It Works
|
||||
|
||||
GitHub Actions automatically uses the built-in secret token to authenticate with GHCR. We recommend creating a `CHARON_TOKEN` secret (preferred); workflows currently still work with `CPMP_TOKEN` for backward compatibility.
|
||||
- ✅ Push images to `ghcr.io/wikid82/charon`
|
||||
|
||||
- ✅ Push images to `ghcr.io/wikid82/charon`
|
||||
- ✅ Link images to your repository
|
||||
- ✅ Publish images for free (public repositories)
|
||||
|
||||
**Nothing to configure!** Just push code and images will be built automatically.
|
||||
|
||||
### Make Your Images Public (Optional):
|
||||
### Make Your Images Public (Optional)
|
||||
|
||||
By default, container images are private. To make them public:
|
||||
|
||||
1. **Go to your repository** → https://github.com/Wikid82/charon
|
||||
1. **Go to your repository** → <https://github.com/Wikid82/charon>
|
||||
2. **Look for "Packages"** on the right sidebar (after first build)
|
||||
3. **Click your package name**
|
||||
4. **Click "Package settings"** (right side)
|
||||
@@ -36,9 +37,9 @@ By default, container images are private. To make them public:
|
||||
|
||||
Your documentation will be published to GitHub Pages (not the wiki). Pages is better for auto-deployment and looks more professional!
|
||||
|
||||
### Enable Pages:
|
||||
### Enable Pages
|
||||
|
||||
1. **Go to your repository** → https://github.com/Wikid82/charon
|
||||
1. **Go to your repository** → <https://github.com/Wikid82/charon>
|
||||
2. **Click "Settings"** (top menu)
|
||||
3. **Click "Pages"** (left sidebar under "Code and automation")
|
||||
4. **Under "Build and deployment":**
|
||||
@@ -46,6 +47,7 @@ Your documentation will be published to GitHub Pages (not the wiki). Pages is be
|
||||
5. That's it! No other settings needed.
|
||||
|
||||
Once enabled, your docs will be live at:
|
||||
|
||||
```
|
||||
https://wikid82.github.io/charon/
|
||||
```
|
||||
@@ -59,12 +61,14 @@ https://wikid82.github.io/charon/
|
||||
### Docker Build Workflow (`.github/workflows/docker-build.yml`)
|
||||
|
||||
**Triggers when:**
|
||||
|
||||
- ✅ You push to `main` branch → Creates `latest` tag
|
||||
- ✅ You push to `development` branch → Creates `dev` tag
|
||||
- ✅ You create a version tag like `v1.0.0` → Creates version tags
|
||||
- ✅ You manually trigger it from GitHub UI
|
||||
|
||||
**What it does:**
|
||||
|
||||
1. Builds the frontend
|
||||
2. Builds a Docker image for multiple platforms (AMD64, ARM64)
|
||||
3. Pushes to Docker Hub with appropriate tags
|
||||
@@ -72,24 +76,28 @@ https://wikid82.github.io/charon/
|
||||
5. Shows you a summary of what was built
|
||||
|
||||
**Tags created:**
|
||||
|
||||
- `latest` - Always the newest stable version (from `main`)
|
||||
- `dev` - The development version (from `development`)
|
||||
- `1.0.0`, `1.0`, `1` - Version numbers (from git tags)
|
||||
- `sha-abc1234` - Specific commit versions
|
||||
|
||||
**Where images are stored:**
|
||||
- `ghcr.io/wikid82/charon:latest`
|
||||
- `ghcr.io/wikid82/charon:dev`
|
||||
- `ghcr.io/wikid82/charon:1.0.0`
|
||||
|
||||
- `ghcr.io/wikid82/charon:latest`
|
||||
- `ghcr.io/wikid82/charon:dev`
|
||||
- `ghcr.io/wikid82/charon:1.0.0`
|
||||
|
||||
### Documentation Workflow (`.github/workflows/docs.yml`)
|
||||
|
||||
**Triggers when:**
|
||||
|
||||
- ✅ You push changes to `docs/` folder
|
||||
- ✅ You update `README.md`
|
||||
- ✅ You manually trigger it from GitHub UI
|
||||
|
||||
**What it does:**
|
||||
|
||||
1. Converts all markdown files to beautiful HTML pages
|
||||
2. Creates a nice homepage with navigation
|
||||
3. Adds dark theme styling (matches the app!)
|
||||
@@ -100,28 +108,32 @@ https://wikid82.github.io/charon/
|
||||
|
||||
## 🎯 Testing Your Setup
|
||||
|
||||
### Test Docker Build:
|
||||
### Test Docker Build
|
||||
|
||||
1. Make a small change to any file
|
||||
2. Commit and push to `development`:
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "test: trigger docker build"
|
||||
git push origin development
|
||||
```
|
||||
|
||||
3. Go to **Actions** tab on GitHub
|
||||
4. Watch the "Build and Push Docker Images" workflow run
|
||||
5. Check **Packages** on your GitHub profile for the new `dev` tag!
|
||||
|
||||
### Test Docs Deployment:
|
||||
### Test Docs Deployment
|
||||
|
||||
1. Make a small change to `README.md` or any doc file
|
||||
2. Commit and push to `main`:
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "docs: update readme"
|
||||
git push origin main
|
||||
```
|
||||
|
||||
3. Go to **Actions** tab on GitHub
|
||||
4. Watch the "Deploy Documentation to GitHub Pages" workflow run
|
||||
5. Visit your docs site (shown in the workflow summary)!
|
||||
@@ -133,6 +145,7 @@ https://wikid82.github.io/charon/
|
||||
When you're ready to release a new version:
|
||||
|
||||
1. **Tag your release:**
|
||||
|
||||
```bash
|
||||
git tag -a v1.0.0 -m "Release version 1.0.0"
|
||||
git push origin v1.0.0
|
||||
@@ -145,6 +158,7 @@ When you're ready to release a new version:
|
||||
- Tests it works
|
||||
|
||||
3. **Users can pull it:**
|
||||
|
||||
```bash
|
||||
docker pull ghcr.io/wikid82/charon:1.0.0
|
||||
docker pull ghcr.io/wikid82/charon:latest
|
||||
@@ -157,26 +171,31 @@ When you're ready to release a new version:
|
||||
### Docker Build Fails
|
||||
|
||||
**Problem**: "Error: denied: requested access to the resource is denied"
|
||||
- **Fix**: This shouldn't happen with `CHARON_TOKEN` or `CPMP_TOKEN` - check workflow permissions
|
||||
|
||||
- **Fix**: This shouldn't happen with `CHARON_TOKEN` or `CPMP_TOKEN` - check workflow permissions
|
||||
- **Verify**: Settings → Actions → General → Workflow permissions → "Read and write permissions" enabled
|
||||
|
||||
**Problem**: Can't pull the image
|
||||
|
||||
- **Fix**: Make the package public (see Step 1 above)
|
||||
- **Or**: Authenticate with GitHub: `echo $CHARON_TOKEN | docker login ghcr.io -u USERNAME --password-stdin` (or `CPMP_TOKEN` for backward compatibility)
|
||||
- **Or**: Authenticate with GitHub: `echo $CHARON_TOKEN | docker login ghcr.io -u USERNAME --password-stdin` (or `CPMP_TOKEN` for backward compatibility)
|
||||
|
||||
### Docs Don't Deploy
|
||||
|
||||
**Problem**: "deployment not found"
|
||||
|
||||
- **Fix**: Make sure you selected "GitHub Actions" as the source in Pages settings
|
||||
- **Not**: "Deploy from a branch"
|
||||
|
||||
**Problem**: Docs show 404 error
|
||||
|
||||
- **Fix**: Wait 2-3 minutes after deployment completes
|
||||
- **Fix**: Check the workflow summary for the actual URL
|
||||
|
||||
### General Issues
|
||||
|
||||
**Check workflow logs:**
|
||||
|
||||
1. Go to **Actions** tab
|
||||
2. Click the failed workflow
|
||||
3. Click the failed job
|
||||
@@ -184,7 +203,8 @@ When you're ready to release a new version:
|
||||
5. Read the error message
|
||||
|
||||
**Still stuck?**
|
||||
- Open an issue: https://github.com/Wikid82/charon/issues
|
||||
|
||||
- Open an issue: <https://github.com/Wikid82/charon/issues>
|
||||
- We're here to help!
|
||||
|
||||
---
|
||||
@@ -192,6 +212,7 @@ When you're ready to release a new version:
|
||||
## 📋 Quick Reference
|
||||
|
||||
### Docker Commands
|
||||
|
||||
```bash
|
||||
# Pull latest development version
|
||||
docker pull ghcr.io/wikid82/charon:dev
|
||||
@@ -207,6 +228,7 @@ docker run -d -p 8080:8080 -v caddy_data:/app/data ghcr.io/wikid82/charon:latest
|
||||
```
|
||||
|
||||
### Git Tag Commands
|
||||
|
||||
```bash
|
||||
# Create a new version tag
|
||||
git tag -a v1.2.3 -m "Release 1.2.3"
|
||||
@@ -223,6 +245,7 @@ git push origin :refs/tags/v1.2.3
|
||||
```
|
||||
|
||||
### Trigger Manual Workflow
|
||||
|
||||
1. Go to **Actions** tab
|
||||
2. Click the workflow name (left sidebar)
|
||||
3. Click "Run workflow" button (right side)
|
||||
@@ -245,9 +268,10 @@ Before pushing to production, make sure:
|
||||
|
||||
---
|
||||
|
||||
## 🎉 You're Done!
|
||||
## 🎉 You're Done
|
||||
|
||||
Your CI/CD pipeline is now fully automated! Every time you:
|
||||
|
||||
- Push to `main` → New `latest` Docker image + updated docs
|
||||
- Push to `development` → New `dev` Docker image for testing
|
||||
- Create a tag → New versioned Docker image
|
||||
|
||||
Reference in New Issue
Block a user