<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all!</div><div><br></div><div>I&#39;m having trouble getting an Apiman docker instance up and running. <br></div><div><br></div><div>The setup is a docker-compose coordinated set of containers in a single VM, running on the cloud.</div><div><br></div><div><font size="1"><span style="font-family:monospace,monospace"> $ docker ps<br>CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                                                              NAMES<br>59a1047d84bd        apiman/on-wildfly11   &quot;/opt/jboss/wildfly/…&quot;   25 minutes ago      Up 25 minutes       8080/tcp                                                           apiman<br>ca8bd1e3bb99        traefik               &quot;/traefik&quot;               About an hour ago   Up 25 minutes       0.0.0.0:80-&gt;80/tcp, 0.0.0.0:443-&gt;443/tcp, 0.0.0.0:8080-&gt;8080/tcp   traefik<br>2a11b776409c        nginx:alpine          &quot;nginx -g &#39;daemon of…&quot;   About an hour ago   Up 25 minutes       80/tcp                                                             nginx<br>21f8c3d3e14e        portainer/portainer   &quot;/portainer&quot;             2 hours ago         Up 25 minutes       9000/tcp                                                           portainer</span></font><br></div><div><br></div><div>Traefik proxies all connections and provides SSL termination. I&#39;m using a LetsEncrypt wildcard certificate; each service has a DNS subdomain.</div><div><ul><li>API-project.domain.tld -&gt; apiman</li><li>WEB-project.domain.tld -&gt; nginx (static pages)</li><li>PORTAINER-project.domain.tld -&gt; portainer </li><li>TRAEFIK-project.domain.tld -&gt; traefik</li></ul><div>All of this works. I can see on my browser each service including apimanui</div><div><br></div><div>The problem starts with the apiman login form. The form itself has a HTTP and not HTTPS action endpoint. <br></div><div><br></div><div>if I login with the admin/admin123! credentials and hit enter, I&#39;ll POST to the auth backend, receive a 302 REDIRECT, follow the redirect and then just prints Forbidden to the screen. Refresh or back now fails with Bad request to the screen. The only way to retry is clearing cookies and local storage.<br></div></div><div><br></div><div>I tried running the single line docker apiman incantation and it works on my laptop, but not when mixed with other containers. Here is my docker-compose file<br></div><div><br></div><div>------------------- <br></div><div><font size="1"><span style="font-family:monospace,monospace">version: &#39;2.4&#39;<br>services:<br> portainer:<br>   image: portainer/portainer<br>   container_name: portainer<br>   mem_limit: 1G<br>   restart: always<br>   volumes: <br>     - /var/run/docker.sock:/var/run/docker.sock<br>     - /mnt/disks/SSD1/portainer:/data<br>   networks:<br>    - network1<br>   labels:<br>     - &quot;traefik.enable=true&quot;<br>     - &quot;traefik.backend=portainer&quot;<br>     - &quot;traefik.frontend.rule=Host:portainer-project.domain.tld&quot;<br>     - &quot;traefik.port=9000&quot;<br>     - &quot;traefik.protocol=http&quot;<br><br> apiman:<br>    image: apiman/on-wildfly11<br>    container_name: apiman<br>    mem_limit: 3G<br>    restart: always<br>    #volumes:<br>    #  - /mnt/disks/SSD1/apiman:/opt/jboss/wildfly/standalone:rw <br>    networks:<br>      - network1<br>    labels:<br>      - &quot;traefik.enable=true&quot;<br>      - &quot;traefik.backend=apiman&quot;<br>      - &quot;traefik.frontend.rule=Host:api-project.domain.tld&quot;<br>      - &quot;traefik.port=8080&quot;<br>      - &quot;traefik.protocol=http&quot;<br><br> web:<br>    image: nginx:alpine<br>    container_name: nginx<br>    mem_limit: 512M<br>    restart: always<br>    networks:<br>      - network1<br>    labels:<br>      - &quot;traefik.enable=true&quot;<br>      - &quot;traefik.backend=web&quot;<br>      - &quot;traefik.frontend.rule=Host:web-project.domain.tld&quot;<br>      - &quot;traefik.port=80&quot;<br>      - &quot;traefik.protocol=http&quot;<br>    <br><br> reverse-proxy:<br>    image: traefik # The official Traefik docker image<br>    container_name: traefik<br>    ports:<br>      - &quot;80:80&quot;     # The HTTP port<br>      - &quot;8080:8080&quot; # The Web UI (enabled by --api)<br>      - &quot;443:443&quot; # The Web UI (enabled by --api)<br>    networks:<br>      - network1<br>    volumes:<br>      - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events<br>      - /mnt/disks/SSD1/traefik/traefik.toml:/etc/traefik/traefik.toml<br>      - /mnt/disks/SSD1/certs:/certs<br>    labels:<br>      - &quot;traefik.enable=true&quot;<br>      - &quot;traefik.backend=traefik&quot;<br>      - &quot;traefik.frontend.rule=Host:traefik-project.domain.tld&quot;<br>      - &quot;traefik.port=8080&quot;<br>      - &quot;traefik.protocol=http&quot;<br><br><br>networks:<br>  network1:<br>   name: web</span></font></div><div><font size="1"><span style="font-family:monospace,monospace">--------------------------------<br></span></font></div><div><br></div><div>My final questions are:</div><div>How can I configure apiman to be aware that it will be called from an https schema?</div><div>In general, What are the caveats of placing Apiman behind a reverse proxy?</div><div><br></div><div>Thanks!<br></div><div><br></div><div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><b>J. Rubén Marrero V.</b></div><div><span><span style="font-family:monospace,monospace">GPG: </span><span><span style="font-family:monospace,monospace">0x1D7087F7</span></span></span></div></div></div></div></div></div></div></div></div>