How tarampampam/3proxy-docker works
Main Components
• Docker Build & Image Component:
– The Dockerfile at the root is responsible for building the container image that packages 3proxy.
– Additional files (.dockerignore, .editorconfig, 3proxy configuration templates, etc.) support the Docker build process.
• 3proxy Service:
– At runtime, the container runs the 3proxy proxy server. Emphasize that it handles two main services: HTTP proxy on port 3128 and SOCKS proxy on port 1080 (by default, configurable via environment variables).
• Configuration & Environment Variables:
– Include the environment variable settings (such as PROXY_LOGIN, PROXY_PASSWORD, PRIMARY_RESOLVER, etc.) as they determine the behavior and customization of the 3proxy service.
– Show how additional configuration (EXTRA_CONFIG) can be appended.
• Kubernetes & Helm Deployment:
– In the deployments/helm directory, a Helm chart is provided (Chart.yaml and related templates) to deploy this Docker image on K8s.
– Represent the relationship between the Helm chart and the containerized service.
• Continuous Integration/Deployment:
– The .github/workflows directory includes CI/CD pipelines for tests, release, and documentation. Although not directly part of the runtime architecture, they assure streamlined builds and deployments.
Relationships and Interactions
• Docker Build Process:
• Container Execution:
– Show that when the container runs (via docker run or as part of K8s/Helm deployment), environment variables are injected to adjust the proxy’s behavior.
• Deployment Modes:
– For local Docker deployments, highlight the command-line examples where ports are mapped and environment variables are set.
– For Kubernetes deployments, illustrate how the Helm chart templates are used to generate a deployment and service that runs the container on a K8s cluster.
• CI/CD Pipelines:
– Optionally, include a separate area showing how GitHub workflows trigger automated builds, testing, and releases that ultimately push new images to registries (Docker Hub and GitHub Container Registry).
Architectural Patterns and Technologies
• Containerization:
– The Dockerfile and related configuration files reflect a containerized microservice approach.
• Configuration via Environment Variables:
– Highlight the design principle of making the image configurable at run time, which is key for flexibility in different deployment environments.
• Helm Chart for Kubernetes:
– The separation of concerns is clear with Helm templates managing K8s deployments. This aligns with best practices for deploying containerized applications.
• CI/CD:
– Focus on automation as per GitHub Actions for building, testing, and releasing the image.