Replies: 2 comments 2 replies
-
Hi @feicipet
|
Beta Was this translation helpful? Give feedback.
-
No, I do not have a single docker compose file with both portainer and nginx. Rather, I have a separate running nginx with this docker compose file:
and my portainer wasn't actually created from a docker compose file. It was actually created from a single docker run command that I copied off from https://docs.portainer.io/start/install-ce/server/docker/linux, and later on I upgraded to Business Edition by buying a Home / Student license and that's why I had to use runlike to reverse engineer what would be the docker run command to re-run my portainer in my original post above. My original idea was not to run nginx + portainer as a pair under the same docker compose file, but rather to use a common nginx reverse proxy to proxy to multiple containers / services, one of them being portainer. So the "shared" network where nginx can forward received traffic to portainer would actually be portainer's docker host where I have exposed portainer's ports on and not the internal docker network. Does that make sense? Would there be a problem if I do it like that? Visually, what I'm trying to do would probably look like this: I understand that this looks a bit weird, but what I was thinking of was that I would eventually move nginx out to another "DMZ" machine / network where it would look like this: That's the reason why I didn't want to combine both nginx and portainer into a single docker compose file. Would that be possible? Thank you, |
Beta Was this translation helpful? Give feedback.
-
Ask a Question!
Hi,
I want to run portainer behind an NGINX RP, and I've read the documentation here: https://docs.portainer.io/advanced/reverse-proxy/nginx
But I already have a running NGINX on the same docker host as another container and I want to reuse that as a common reverse proxy for all my other services running on that host.
So I figured that I would try to run the portainer container without SSL on port 9000 and configure my NGINX to point to it instead.
Using runlike, I managed to extract out the docker run command for my current running portainer:
According to the documentation for running NGINX + portainer as a docker compose bundle, I would need to export 9000 and also add a couple of environment variables:
But for the NGINX portion of the docker compose file, I'm confused on why there's a need for this volume:
Is is really necessary for NGINX to have this volume? Is it OK if I skip this? And it would be impossible to implement if my NGINX is residing on another host anyway.
Would there be any other steps that I need to execute in order to achieve what I want?
Thanks
Wong
Beta Was this translation helpful? Give feedback.
All reactions