EE v4 access other docker app

Hi everyone,
I’d like to have portainer installed along wordpress sites to manage containers.
if I installed docker manual and start portainer i can access it. but if i install ee (which install docker automatically) I can create, access wordpress sites, but cant access portainer at all.

So i thought it could be that I cant access portainer because of nginx proxy (I’m not so sure)
in some post i saw something like this
ee site create example.com --proxy=127.0.0.1:64

but when i type it i got this error:
Error: Parameter errors:
unknown --proxy parameter

is --proxy an outdated parameter in v3? are there anything equivalent to it in
ee --version
EE 4.0.11

You will have to ee site create portainer.doman.tld and edit its nginx.conf to proxy_pass it to portainer’s port.

This is why I didn’t go with jwilder’s nginx proxy for my docker stack. I went with Traefik, requires no config files to proxy docker containers.

1 Like

Hi cim,
could you tell me where or which nginx.conf I should edit? Normally I think its under /etc/nginx/nginx.conf but as ee v4 use docker i dont know in which container or where i should search it for

According to https://easyengine.io/handbook/internal/nginx-proxy I found something about nginx proxy but it said do not edit file
/opt/easyengine/services/nginx-proxy/conf.d/default.conf as it will be regenerate when nginx is restarted

If possible could you please show me an example to edit the proxy_pass of the container?

I’m not using EEv4 anymore but unfortunately you will have to edit that file since it has the upstream block. From what I remember, just add the port number then restart the proxy container.

I got into the nginx-proxy container like this: docker exec -i -t services_global-nginx-proxy_1 /bin/bash
Seems like /etc/nginx/conf.d/default.conf inside nginx-proxy container is the same to the file /opt/easyengine/services/nginx-proxy/conf.d/default.conf
when i edit them and restart nginx (sudo ee service restart nginx-proxy) all the changes are reverted

I also editted another file inside nginx-proxy container
nano /etc/nginx/conf.d/portainer.dockercenter.de-redirect.conf

after restarting nginx the content is still there (the location proxy_pass inside server 443 block), but when i go to the link portainer.dockercenter.de it still point to the original site.

portainer.dockercenter.de-redirect.conf

server {
listen 80;
server_name www.portainer.dockercenter.de;
return 301 https://portainer.dockercenter.de$request_uri;
}
server {
listen 443;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256$
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_certificate /etc/nginx/certs/portainer.dockercenter.de.crt;
ssl_certificate_key /etc/nginx/certs/portainer.dockercenter.de.key;
location / {
proxy_pass http://dockercenter.de:9000/;
}
server_name www.portainer.dockercenter.de;
return 301 https://portainer.dockercenter.de$request_uri;
}

any other idea?