chore: Remove legacy Docker configuration and documentation
Some checks failed
API Gateway (Java Spring Boot) / test (21) (push) Successful in 2m2s
API Gateway (Java Spring Boot) / test (17) (push) Successful in 2m2s
Frontend (React) / test (20) (push) Successful in 2m11s
Integration Tests / integration-tests (push) Failing after 25s
Integration Tests / performance-tests (push) Has been skipped
API Docs (Node.js Express) / test (20) (push) Successful in 2m36s
API Gateway (Java Spring Boot) / build (push) Failing after 40s
Service Adapters (Python FastAPI) / test (3.11) (push) Successful in 1m24s
Service Adapters (Python FastAPI) / test (3.12) (push) Successful in 1m27s
Service Adapters (Python FastAPI) / test (3.13) (push) Successful in 1m27s
Frontend (React) / build (push) Failing after 58s
Service Adapters (Python FastAPI) / build (push) Failing after 21s
Frontend (React) / lighthouse (push) Has been skipped
API Docs (Node.js Express) / build (push) Failing after 1m24s

### Summary of Changes
- Deleted `docker-compose.dev.yml` and `docker-compose.yml` files to streamline the project structure.
- Removed outdated Dockerfiles for services (API Gateway, Service Adapters, API Docs, and Frontend) to eliminate redundancy.
- Updated `env.example` to reflect changes in service configurations, including local host settings for PostgreSQL and Redis.
- Revised `README.md` to remove references to Docker deployment and clarify local development setup instructions.
- Cleaned up documentation structure by removing obsolete files related to Docker rate limits and compatibility fixes.

### Expected Results
- Simplified project setup and improved clarity for developers by focusing on current configurations and removing legacy artifacts.
This commit is contained in:
GSRN
2025-09-18 00:50:03 +02:00
parent 7bb753e293
commit 4b2ef7e246
15 changed files with 45 additions and 901 deletions

View File

@@ -1,201 +0,0 @@
# Docker Hub Rate Limit Fix
## Problem
```
Error response from daemon: toomanyrequests: You have reached your unauthenticated pull rate limit. https://www.docker.com/increase-rate-limit
```
Docker Hub has strict rate limits:
- **Unauthenticated**: 100 pulls per 6 hours per IP
- **Authenticated (free)**: 200 pulls per 6 hours per user
- **Pro/Team**: Higher limits
## Solutions
### Solution 1: Use Docker Hub Authentication (Recommended)
#### 1.1. Create Docker Hub Account
1. Go to [Docker Hub](https://hub.docker.com)
2. Create a free account
3. Note your username and password
#### 1.2. Update Runner Configurations
Add Docker authentication to each runner config:
**`runners/config_heavy.yaml`:**
```yaml
container:
# Docker registry authentication
docker_username: "your_dockerhub_username"
docker_password: "your_dockerhub_password"
```
**`runners/config_light.yaml`:**
```yaml
container:
# Docker registry authentication
docker_username: "your_dockerhub_username"
docker_password: "your_dockerhub_password"
```
**`runners/config_docker.yaml`:**
```yaml
container:
# Docker registry authentication
docker_username: "your_dockerhub_username"
docker_password: "your_dockerhub_password"
```
**`runners/config_security.yaml`:**
```yaml
container:
# Docker registry authentication
docker_username: "your_dockerhub_username"
docker_password: "your_dockerhub_password"
```
#### 1.3. Alternative: Use Environment Variables
Instead of hardcoding credentials, use environment variables:
**Update `runners/.env.runners`:**
```bash
# Docker Hub credentials
DOCKER_USERNAME=your_dockerhub_username
DOCKER_PASSWORD=your_dockerhub_password
```
**Update config files:**
```yaml
container:
docker_username: ${DOCKER_USERNAME}
docker_password: ${DOCKER_PASSWORD}
```
### Solution 2: Use Alternative Registries
#### 2.1. Use GitHub Container Registry (ghcr.io)
Update image references to use GitHub's registry:
**Heavy Runner:**
```yaml
labels:
- "java:docker://ghcr.io/openjdk/openjdk:17-jdk-slim"
- "python:docker://ghcr.io/library/python:3.11-slim"
```
**Light Runner:**
```yaml
labels:
- "nodejs:docker://ghcr.io/library/node:20-slim"
- "frontend:docker://ghcr.io/library/node:20-slim"
```
#### 2.2. Use Quay.io Registry
```yaml
labels:
- "java:docker://quay.io/eclipse/alpine_jdk17:latest"
- "python:docker://quay.io/python/python:3.11-slim"
- "nodejs:docker://quay.io/node/node:20-slim"
```
### Solution 3: Use Local Image Caching
#### 3.1. Pre-pull Images on Runner Host
```bash
# On your runner host machine
docker pull openjdk:17-jdk-slim
docker pull python:3.11-slim
docker pull node:20-slim
docker pull docker:24-dind
docker pull alpine:3.19
# Tag as local images
docker tag openjdk:17-jdk-slim localhost:5000/openjdk:17-jdk-slim
docker tag python:3.11-slim localhost:5000/python:3.11-slim
docker tag node:20-slim localhost:5000/node:20-slim
docker tag docker:24-dind localhost:5000/docker:24-dind
docker tag alpine:3.19 localhost:5000/alpine:3.19
```
#### 3.2. Update Config to Use Local Images
```yaml
labels:
- "java:docker://localhost:5000/openjdk:17-jdk-slim"
- "python:docker://localhost:5000/python:3.11-slim"
- "nodejs:docker://localhost:5000/node:20-slim"
```
### Solution 4: Reduce Image Pulls
#### 4.1. Disable Force Pull
Update all config files:
```yaml
container:
# Don't pull if image already exists
force_pull: false
```
#### 4.2. Use Image Caching
```yaml
container:
# Enable image caching
force_pull: false
force_rebuild: false
```
### Solution 5: Use Self-Hosted Registry
#### 5.1. Set up Local Registry
```bash
# Run local Docker registry
docker run -d -p 5000:5000 --name registry registry:2
# Mirror images to local registry
docker pull openjdk:17-jdk-slim
docker tag openjdk:17-jdk-slim localhost:5000/openjdk:17-jdk-slim
docker push localhost:5000/openjdk:17-jdk-slim
```
#### 5.2. Update Configs to Use Local Registry
```yaml
labels:
- "java:docker://localhost:5000/openjdk:17-jdk-slim"
```
## Recommended Approach
**For immediate fix**: Use Solution 1 (Docker Hub authentication)
**For long-term**: Combine Solutions 1 + 4 (auth + caching)
## Implementation Steps
1. **Create Docker Hub account** (if you don't have one)
2. **Update `.env.runners`** with credentials
3. **Update all config files** with authentication
4. **Set `force_pull: false`** to reduce pulls
5. **Test with a simple job**
## Verification
After implementing, test with:
```bash
# Check if authentication works
docker login
docker pull openjdk:17-jdk-slim
```
## References
- [Docker Hub Rate Limits](https://www.docker.com/increase-rate-limit)
- [Gitea Actions Documentation](https://docs.gitea.com/usage/actions/design#act-runner)
- [Docker Registry Authentication](https://docs.docker.com/engine/reference/commandline/login/)

View File

@@ -149,12 +149,7 @@ runners/
# Scripts
scripts/
├── check-registry.ps1 # Windows PowerShell registry check script
── check-registry.sh # Linux/macOS registry check script
├── docker-compatibility.ps1 # Windows PowerShell Docker compatibility fix
├── docker-compatibility.sh # Linux/macOS Docker compatibility fix
├── fix-docker-compatibility.ps1 # Windows PowerShell quick fix script
├── fix-docker-compatibility.sh # Linux/macOS quick fix script
└── test-docker-compatibility.ps1 # Windows PowerShell compatibility test
── check-registry.sh # Linux/macOS registry check script
└── docs/ # Documentation
├── specs.md # Project specifications
@@ -163,9 +158,6 @@ scripts/
├── RUNNERS.md # Gitea runners setup and management
├── RUNNER_LABELS.md # Runner labels technical documentation
├── OPTIMIZATION_RECOMMENDATIONS.md # CI/CD optimization recommendations
├── DOCKER_RATE_LIMIT_FIX.md # Docker Hub rate limit solutions
├── CI_CD.md # CI/CD pipeline documentation
├── CACHE_TROUBLESHOOTING.md # Cache troubleshooting guide
├── SONARQUBE_INTEGRATION.md # SonarQube integration documentation
├── DOCKER_DEPLOYMENT.md # Docker deployment and registry guide
└── DOCKER_COMPATIBILITY.md # Docker version compatibility guide
├── SONARQUBE_INTEGRATION.md # SonarQube integration documentation