Add Docker Compose deployment guide for Angie Docker Proxy#495
Conversation
| @@ -0,0 +1,472 @@ | |||
| # Deploying Yii applications with Angie Docker Proxy | |||
|
|
|||
| Angie Docker Proxy is a small reverse proxy for Docker Compose projects. It runs in a separate container alongside the | |||
There was a problem hiding this comment.
Link to the project page would be good to have in the first sentences.
| `yii-app/Dockerfile`: | ||
|
|
||
| ```dockerfile | ||
| FROM php:8.3-apache |
There was a problem hiding this comment.
I'd use FPM+Angie for it instead of Apache.
| EXPOSE 80 | ||
| ``` | ||
|
|
||
| `yii-app/public/index.php`: |
There was a problem hiding this comment.
That doesn't look like Yii3 app.
| `Dockerfile`: | ||
|
|
||
| ```dockerfile | ||
| FROM ubuntu:24.04 |
There was a problem hiding this comment.
Is there a ready to use official image? Would simplify things a lot if it's used instead of building our own.
| - VIRTUAL_HOST=angie-demo.example.ru | ||
| - VIRTUAL_PORT=80 | ||
| - APP_NAME=Yii demo behind Angie HTTPS |
| 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?
| - 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?
| `/etc/angie/angie.conf` and runs: | ||
|
|
||
| ```sh | ||
| angie -s reload |
There was a problem hiding this comment.
No downtime? If so, please state it.
Summary
Adds a cookbook guide for deploying Yii applications with Angie Docker Proxy and Docker Compose.