Skip to content

Add Docker Compose deployment guide for Angie Docker Proxy#495

Open
artnovak wants to merge 1 commit into
yiisoft:masterfrom
artnovak:docs/angie-docker-proxy
Open

Add Docker Compose deployment guide for Angie Docker Proxy#495
artnovak wants to merge 1 commit 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.

@@ -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

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.

Link to the project page would be good to have in the first sentences.

`yii-app/Dockerfile`:

```dockerfile
FROM php:8.3-apache

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.

I'd use FPM+Angie for it instead of Apache.

EXPOSE 80
```

`yii-app/public/index.php`:

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.

That doesn't look like Yii3 app.

`Dockerfile`:

```dockerfile
FROM ubuntu:24.04

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.

Is there a ready to use official image? Would simplify things a lot if it's used instead of building our own.

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?

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?

- 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?

`/etc/angie/angie.conf` and runs:

```sh
angie -s reload

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.

No downtime? If so, please state it.

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