Files
labFusion/docs/GITEA_DEPLOYMENT.md
GSRN 7bb753e293
Some checks failed
API Docs (Node.js Express) / test (20) (push) Failing after 1m49s
API Docs (Node.js Express) / build (push) Has been skipped
API Gateway (Java Spring Boot) / test (17) (push) Failing after 3m18s
Docker Build and Push / setup (push) Successful in 10s
API Gateway (Java Spring Boot) / test (21) (push) Successful in 1m56s
API Gateway (Java Spring Boot) / build (push) Has been skipped
Docker Build and Push / build-push-service-adapters (push) Failing after 29s
Docker Build and Push / build-push-api-gateway (push) Failing after 32s
Docker Build and Push / build-push-api-docs (push) Failing after 31s
Docker Build and Push / build-push-frontend (push) Failing after 28s
Docker Build and Push / test-compatibility (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 2m47s
Integration Tests / performance-tests (push) Has been skipped
chore: Update Docker configuration and documentation
### Summary of Changes
- Enhanced `docker-compose` files to include BuildKit compatibility settings for improved caching during builds.
- Updated service definitions to use pre-built images from the specified Docker registry, ensuring consistency across environments.
- Added Docker registry configuration to the `.env` example file for clarity on deployment settings.
- Revised the `README.md` to include instructions for using pre-built images and local development setups, along with Docker compatibility troubleshooting steps.
- Introduced health checks in the `Dockerfile` for the API Docs service to ensure container readiness.

### Expected Results
- Improved build performance and deployment clarity, facilitating easier setup for new developers and enhancing overall project maintainability.
2025-09-18 00:28:21 +02:00

173 lines
4.9 KiB
Markdown

# LabFusion Gitea Registry Deployment
This guide explains how to deploy LabFusion using images from your Gitea container registry.
## Registry Information
- **Registry URL**: `gittea.kammenstraatha.duckdns.org/admin`
- **Username**: `admin`
- **Image Tag**: `main`
## Quick Start
### 1. Authentication
First, authenticate with your Gitea registry:
```bash
# Login to Gitea registry
docker login gittea.kammenstraatha.duckdns.org/admin
# Enter your Gitea username and password when prompted
```
### 2. Configuration
The Docker Compose files are already configured to use your Gitea registry by default. No additional configuration is needed unless you want to override the defaults.
**Default Configuration:**
```bash
DOCKER_REGISTRY=gittea.kammenstraatha.duckdns.org/admin
DOCKER_USERNAME=admin
IMAGE_TAG=main
```
### 3. Deploy
```bash
# Production deployment
docker-compose up -d
# Development deployment (with volume mounts)
docker-compose -f docker-compose.dev.yml up -d
```
## Image URLs
Your LabFusion images are available at:
- **API Gateway**: `gittea.kammenstraatha.duckdns.org/admin/api-gateway:main`
- **Service Adapters**: `gittea.kammenstraatha.duckdns.org/admin/service-adapters:main`
- **Frontend**: `gittea.kammenstraatha.duckdns.org/admin/frontend:main`
- **API Docs**: `gittea.kammenstraatha.duckdns.org/admin/api-docs:main`
## Verification
### Check if images are accessible:
```bash
# Test pulling each image
docker pull gittea.kammenstraatha.duckdns.org/admin/api-gateway:main
docker pull gittea.kammenstraatha.duckdns.org/admin/service-adapters:main
docker pull gittea.kammenstraatha.duckdns.org/admin/frontend:main
docker pull gittea.kammenstraatha.duckdns.org/admin/api-docs:main
```
### Check running services:
```bash
# View running containers
docker-compose ps
# Check logs
docker-compose logs api-gateway
docker-compose logs service-adapters
docker-compose logs frontend
docker-compose logs api-docs
```
## Troubleshooting
### Common Issues
1. **Authentication Failed**:
```bash
# Re-authenticate
docker logout gittea.kammenstraatha.duckdns.org/admin
docker login gittea.kammenstraatha.duckdns.org/admin
```
2. **Image Not Found**:
```bash
# Check if images exist in registry
curl -u admin:password https://gittea.kammenstraatha.duckdns.org/admin/v2/_catalog
```
3. **Network Issues**:
```bash
# Test connectivity
ping gittea.kammenstraatha.duckdns.org
curl -I https://gittea.kammenstraatha.duckdns.org/admin/v2/
```
4. **Permission Denied**:
- Verify you have access to the `admin` organization
- Check if the images are public or require authentication
- Ensure your Gitea account has the necessary permissions
### Debug Commands
```bash
# Check Docker daemon logs
docker system events
# Inspect image details
docker inspect gittea.kammenstraatha.duckdns.org/admin/api-gateway:main
# Check registry connectivity
docker pull gittea.kammenstraatha.duckdns.org/admin/api-gateway:main
```
## Environment Variables
You can override the default registry settings by setting environment variables:
```bash
# Use different tag
export IMAGE_TAG=v1.0.0
docker-compose up -d
# Use different registry (if you have multiple)
export DOCKER_REGISTRY=your-other-registry.com
export DOCKER_USERNAME=your-username
docker-compose up -d
```
## CI/CD Integration
If you're using Gitea Actions to build and push images, ensure your workflow pushes to the correct registry:
```yaml
# Example Gitea Actions workflow
- name: Build and Push Images
run: |
# Build and tag images
docker build -t gittea.kammenstraatha.duckdns.org/admin/api-gateway:main ./services/api-gateway
docker build -t gittea.kammenstraatha.duckdns.org/admin/service-adapters:main ./services/service-adapters
docker build -t gittea.kammenstraatha.duckdns.org/admin/frontend:main ./frontend
docker build -t gittea.kammenstraatha.duckdns.org/admin/api-docs:main ./services/api-docs
# Push to registry
docker push gittea.kammenstraatha.duckdns.org/admin/api-gateway:main
docker push gittea.kammenstraatha.duckdns.org/admin/service-adapters:main
docker push gittea.kammenstraatha.duckdns.org/admin/frontend:main
docker push gittea.kammenstraatha.duckdns.org/admin/api-docs:main
```
## Security Considerations
- **Authentication**: Always authenticate before pulling images
- **HTTPS**: Ensure your Gitea registry uses HTTPS
- **Access Control**: Verify that only authorized users can access the images
- **Image Scanning**: Regularly scan images for vulnerabilities
- **Updates**: Keep images updated with security patches
## Support
If you encounter issues with the Gitea registry deployment:
1. Check the troubleshooting section above
2. Verify your Gitea registry configuration
3. Check network connectivity to `gittea.kammenstraatha.duckdns.org`
4. Ensure you have proper permissions in the `admin` organization
5. Review Docker and Docker Compose logs for detailed error messages