# 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