title: Using pgadmin with nginx in docker containers
body: <p>I felt into issues configuring environment, containing postgres, pgadmin and nginx. All this services are in docker containers and here is my docker-compose file:</p>
  
  <pre><code>version: '3'
  
  services:
    postgres:
      image: postgres
      environment:
        POSTGRES_USER: postgres
        POSTGRES_PASSWORD: postgres
  
    pgadmin:
      links:
        - postgres:postgres
      image: dpage/pgadmin4:3.0
      environment:
        PGADMIN_DEFAULT_EMAIL: 'postgres@pg.com'
        PGADMIN_DEFAULT_PASSWORD: 'postgres'
      ports:
        - "5050:80"
      restart: unless-stopped
  
    nginx:
      links:
        - pgadmin:pgadmin
      image: "nginx:1.13.12"
      ports:
        - "80:80"
      volumes:
        - ./nginxServers/server:/etc/nginx/conf.d/default.conf
  </code></pre>
  
  <p>And here is my <code>nginx.conf</code>, placed in <code>./nginxServers/server</code>:</p>
  
  <pre><code>server {
      listen       80;
      server_name  _;
  
      location  /pgadmin/ {                                                                    
              proxy_pass http://pgadmin/;
      }
  }
  </code></pre>
  
  <p>As you can see, it's a very simple setup, allowing me to use pgadmin via <a href="http://localhost/pgadmin" rel="nofollow noreferrer">http://localhost/pgadmin</a>.</p>
  
  <p>Unfortunately, this doesn't work. I can see pgadmin web interface via <a href="http://127.0.0.1:5050" rel="nofollow noreferrer">http://127.0.0.1:5050</a>, but when i navigate to <a href="http://127.0.0.1/pgadmin" rel="nofollow noreferrer">http://127.0.0.1/pgadmin</a>, all the styles and scripts are not loaded. </p>
  
  <p>I also tried another location in nginx configuration:</p>
  
  <pre><code>location  /pgadmin {                                                                    
              proxy_pass http://pgadmin;
  }
  </code></pre>
  
  <p>But this also didn't help.</p>
  
  <p>Thus, i'm stucked with correct configuration of nginx as a reverse proxy for pgadmin. </p>
  
  <p>P.S. As i've googled, this problem can be with serving django static content, but since i'm not familiar with django, i can't get any workaround.</p>
  
  <p>I'll be gratefull for any help with this strange problem.</p>