# Docker Hub Integration Setup ## Required Secrets Add these secrets to your Gitea repository settings: ### 1. DOCKER_HUB_USERNAME - Your Docker Hub username (e.g., "jskala") ### 2. DOCKER_HUB_TOKEN - Your Docker Hub access token (NOT your password) ## Creating a Docker Hub Access Token 1. Go to [Docker Hub](https://hub.docker.com/) 2. Sign in to your account 3. Click your avatar → **Account Settings** 4. Go to **Security** tab 5. Click **New Access Token** 6. Name it: `NFOGuard-CI` 7. Permissions: **Read, Write, Delete** 8. Click **Generate** 9. **Copy the token immediately** (you won't see it again) ## Adding Secrets to Gitea 1. Go to your NFOguard repository in Gitea 2. Click **Settings** → **Secrets** 3. Add the following secrets: - **Name**: `DOCKER_HUB_USERNAME` - **Value**: Your Docker Hub username - **Name**: `DOCKER_HUB_TOKEN` - **Value**: The access token you generated ## What Gets Published ### Main Branch (Production) - `yourusername/nfoguard:latest` - `yourusername/nfoguard:v1.5.2` (version from VERSION file) - `yourusername/nfoguard:sha-abc123` (git commit SHA) ### Dev Branch - `yourusername/nfoguard:dev` - `yourusername/nfoguard:dev-sha-abc123` ## Usage Examples Once set up, users can pull from either registry: ```bash # From your local Gitea registry (fast for you) docker pull 192.168.253.221:3000/jskala/nfoguard:latest # From Docker Hub (public access) docker pull yourusername/nfoguard:latest # Dev versions docker pull yourusername/nfoguard:dev ``` ## Testing the Setup After adding the secrets, push a commit to trigger the CI: ```bash git add . git commit -m "Add Docker Hub CI integration" git push origin main ``` Watch the Actions tab in Gitea to see both registries being pushed to successfully! ## Benefits - **Local**: Ultra-fast local builds and deployment - **Public**: Anyone can use `docker pull yourusername/nfoguard:latest` - **Redundancy**: Multiple image sources - **Versioning**: Proper semantic versioning across both registries