Skip to content

Add Docker Compose deployment guide for Angie Docker Proxy#495

Open
artnovak wants to merge 5 commits into
yiisoft:masterfrom
artnovak:docs/angie-docker-proxy
Open

Add Docker Compose deployment guide for Angie Docker Proxy#495
artnovak wants to merge 5 commits into
yiisoft:masterfrom
artnovak:docs/angie-docker-proxy

Conversation

@artnovak

Copy link
Copy Markdown
Q A
Is bugfix?
New feature?
Breaks BC?
Tests pass?
Fixed issues

Summary

Adds a cookbook guide for deploying Yii applications with Angie Docker Proxy and Docker Compose.

Comment thread src/cookbook/angie-docker-proxy.md Outdated
Comment thread src/cookbook/angie-docker-proxy.md Outdated
Comment thread src/cookbook/angie-docker-proxy.md Outdated
Comment thread src/cookbook/angie-docker-proxy.md Outdated
Comment thread src/cookbook/angie-docker-proxy.md Outdated
Comment on lines +287 to +289
- VIRTUAL_HOST=angie-demo.example.ru
- VIRTUAL_PORT=80
- APP_NAME=Yii demo behind Angie HTTPS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTPS on port 80?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/cookbook/angie-docker-proxy.md Outdated
Comment on lines +313 to +315
environment:
- VIRTUAL_HOST=example-demo.example.com
- VIRTUAL_PORT=80

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually Traefik/Caddy use Docker labels. What's the benefit of using environment varialbes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/cookbook/angie-docker-proxy.md Outdated
- proxy
```

After adding the new service block, apply the changes:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/cookbook/angie-docker-proxy.md Outdated
@artnovak

artnovak commented Jul 22, 2026

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants