Add Docker Compose deployment guide for Angie Docker Proxy#495
Add Docker Compose deployment guide for Angie Docker Proxy#495artnovak wants to merge 5 commits into
Conversation
| - VIRTUAL_HOST=angie-demo.example.ru | ||
| - VIRTUAL_PORT=80 | ||
| - APP_NAME=Yii demo behind Angie HTTPS |
There was a problem hiding this comment.
VIRTUAL_PORT=80 is the applications internal HTTP port inside the Docker network. TLS terminates at Angie on port 443, and Angie forwards the request to the application over HTTP.
| environment: | ||
| - VIRTUAL_HOST=example-demo.example.com | ||
| - VIRTUAL_PORT=80 |
There was a problem hiding this comment.
Usually Traefik/Caddy use Docker labels. What's the benefit of using environment varialbes?
There was a problem hiding this comment.
Traefik has a built-in Swarm provider and primarily uses labels. Caddy provides similar behavior through caddy-docker-proxy. This project uses docker-gen, which watches the Docker API and renders the Angie configuration from a Go template.
docker-gen can read both labels and environment variables. I used VIRTUAL_HOST and VIRTUAL_PORT to keep the example simple. Labels could be supported later, but they are not supported by the current template.
| - proxy | ||
| ``` | ||
|
|
||
| After adding the new service block, apply the changes: |
There was a problem hiding this comment.
A note about Swarm / k8s should be added. I assume, it doesn't matter which orchestartor is used since docker-gen doesn't care, right?
There was a problem hiding this comment.
docker-gen does care about the orchestrator because it relies on the Docker API. k8s does not expose workloads through that API, so an Ingress or Gateway API controller should be used instead. This implementation is intended for Docker Compose only.
|
I moved the detailed “How it works” section to the main documentation on Docker Hub. The article now focuses on how to use angie-docker-proxy without going into its internal implementation. The article is now simpler and contains only the information needed to get started. Readers interested in additional details can follow the link to the full documentation. |
Summary
Adds a cookbook guide for deploying Yii applications with Angie Docker Proxy and Docker Compose.