Support multiple domains with Traefik and automatic HTTPS#5
Open
Support multiple domains with Traefik and automatic HTTPS#5
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #1
This commit implements a production-ready Docker Compose setup with Traefik reverse proxy supporting multiple domains with automatic HTTPS/TLS certificates via Let's Encrypt. Features: - Support for 5 domains (all pointing to same API Gateway): * api.deep.assistant.run.place * api-deep-assistant.mooo.com * api-deep-assistant.yee.pw * assistant.yee.pw * api-deep-assistant.duckdns.org - Automatic HTTPS certificate generation and renewal via Let's Encrypt - HTTP to HTTPS redirects for all domains - Traefik dashboard with basic authentication - Environment-based configuration with .env file support - Complete deployment documentation Files added: - docker-compose.prod.yml: Production Docker Compose configuration with Traefik - .env.example: Template for environment variables - README-deployment.md: Comprehensive deployment and maintenance guide Files modified: - .gitignore: Removed docker-compose.prod.yml and consolidated letsencrypt entries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit f79dace.
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements support for multiple domains with automatic HTTPS/TLS certificate generation using Traefik reverse proxy and Let's Encrypt.
Fixes #1
Changes
🚀 New Files
docker-compose.prod.yml- Production Docker Compose configuration.env.example- Environment variable templateREADME-deployment.md- Comprehensive deployment guide🔧 Modified Files
.gitignore- Updated to allow docker-compose.prod.yml while protecting sensitive dataSupported Domains
All the following domains are configured with automatic HTTPS and point to the same API Gateway service:
api.deep.assistant.run.placeapi-deep-assistant.mooo.comapi-deep-assistant.yee.pwassistant.yee.pwapi-deep-assistant.duckdns.orgAll domains resolve to:
173.212.230.201Technical Details
Architecture
Key Features
✅ Automatic SSL Certificates
./letsencrypt/acme.json✅ Multiple Domain Support
✅ HTTP to HTTPS Redirects
✅ Traefik Dashboard
https://traefik.api.deep.assistant.run.placeadmin, password:change_this_password)✅ Environment-Based Configuration
.envfile (not committed to Git).env.exampleDeployment
Quick Start
Clone the repository and checkout this branch:
git clone https://github.com/deep-assistant/api-gateway.git cd api-gateway git checkout issue-1-9255701be424Create
.envfile from template:Edit
.envwith your configuration:At minimum, configure:
LETSENCRYPT_EMAIL- Your email for Let's Encrypt notificationsADMIN_FIRST- Your master token for admin operationsOPENAI_API_KEY)Deploy the stack:
Verify deployment:
Test the API:
For detailed deployment instructions, see README-deployment.md.
Configuration Validation
The configuration has been validated:
✓ Docker Compose YAML syntax is valid
✓ Found 2 services: api-gateway, traefik
✓ Found 5 HTTPS domain routers configured
✓ Found 5 HTTP→HTTPS redirect routers configured
✓ Found 5 TLS/SSL certificate configurations
✓ Total labels on api-gateway: 37
✓ Total labels on traefik: 9
✓ Traefik dashboard configuration validated
✓ Network configuration validated
Security Considerations
🔒 Default Security Measures:
.envfile excluded from GitBefore production deployment, you MUST:
admin:change_this_password)ADMIN_FIRSTmaster tokenSee README-deployment.md for detailed security instructions.
Testing Checklist
Documentation
📖 Deployment Guide: README-deployment.md
📋 Environment Template: .env.example
🏗️ Architecture: ARCHITECTURE.md
Next Steps
After merging this PR:
Deploy to production server:
.envfile with production valuesdocker-compose -f docker-compose.prod.yml up -dVerify SSL certificates:
docker-compose -f docker-compose.prod.yml logs traefik | grep -i certificateSecurity hardening:
Optional enhancements:
Related Issues
🤖 Generated with Claude Code