Feature #7351. Adding APACHE_LABEL to apply custom labels#7419
Feature #7351. Adding APACHE_LABEL to apply custom labels#7419omnizach wants to merge 1 commit intonextcloud:mainfrom
Conversation
…-based reverse proxies.
szaimen
left a comment
There was a problem hiding this comment.
Hi, I fear this is not how this works. You would probably need to add the labels something like this:
However obviously not for all containers but only for the domaincheck and apache containers
|
I missed that the environment variables need to be passed through container.json. I see what you mean about not doing this in the DockerFile, but in the php. I'm working on moving the code there. However, I see in your example the After adding the environment variables to container.json, will the direct DockerFile solution not work at all? Would adding these labels as a simple string in php work (as it will eventually add this to the generated DockerFile in the same syntax)? Apologies for the rudimentary questions here. I looked for documentation for setting this up in a development environment, but I have to admit that while I can do this for a simple DockerFile, this is a bit beyond my skills at the moment. If I can get a dev environment going, I can answer these questions for myself and get it right. |
|
Hi,
See https://github.com/nextcloud/all-in-one/blob/main/develop.md#how-to-locally-build-and-test-changes-to-mastercontainer for how you can spin up a dev instance |
|
for traefik there already a solution that can be used until this feature is ready, here a compose example: services:
nextcloud-aio-mastercontainer:
...
environment:
...
- APACHE_ADDITIONAL_NETWORK=proxy
labels:
...
- "traefik.docker.network=proxy"
- "traefik.http.services.nextcloud.loadbalancer.server.url=http://nextcloud-aio-apache:PORT" |
This applies custom labels to the Apache and Domaincheck containers based on the APACHE_LABEL environment label when composing the master container. This allows for configuration of label-based reverse proxies such as TSDProxy and Traefik, making reverse proxy configuration much easier and provide more options.