title: docker nginx reverse proxy 503 Service Temporarily Unavailable
body: <p>I want to use nginx as reverse proxy for my remote home automation access.</p>
  <p>My infrastructure yaml looks like follows:</p>
  <pre class="lang-yaml prettyprint-override"><code># /infrastructure/docker-compose.yaml
  version: '3'
  
  services:
    proxy:
      image: jwilder/nginx-proxy:alpine
      container_name: proxy
      networks:
        - raspberry_network
      ports:
        - 80:80
        - 443:443
      environment:
        - ENABLE_IPV6=true
        - DEFAULT_HOST=${RASPBERRY_IP}
      volumes:
        - ./proxy/conf.d:/etc/nginx/conf.d
        - ./proxy/vhost.d:/etc/nginx/vhost.d
        - ./proxy/html:/usr/share/nginx/html
        - ./proxy/certs:/etc/nginx/certs
        - /etc/localtime:/etc/localtime:ro
        - /var/run/docker.sock:/tmp/docker.sock:ro
      restart: always
  
  networks:
    raspberry_network:
  </code></pre>
  <p>My yaml containing the app configuration looks like this:</p>
  <pre class="lang-yaml prettyprint-override"><code># /apps/docker-compose.yaml
  
  version: '3'
  
  services:
    homeassistant:
      container_name: home-assistant
      image: homeassistant/raspberrypi4-homeassistant:stable
      volumes:
        - ./homeassistant:/config
        - /etc/localtime:/etc/localtime:ro
      environment:
        - 'TZ=Europe/Berlin'
        - 'VIRTUAL_HOST=${HOMEASSISTANT_VIRTUAL_HOST}'
        - 'VIRTUAL_PORT=8123'
      deploy:
        resources:
          limits:
            memory: 250M
      restart: unless-stopped
      networks:
        - infrastructure_raspberry_network
      ports:
        - '8123:8123'
  
  networks:
    infrastructure_raspberry_network:
      external: true
  
  </code></pre>
  <p>Via portainer I validated that both containers are contected to the same network. However, when accessing my local IP of the raspberry pi 192.168.0.10 I am receiving &quot;503 Service Temporarily Unavailable&quot;.</p>
  <p>Of course when I try accessing my app via the virtual host domain xxx.xxx.de it neither works.</p>
  <p>Any idea what the issue might be? Or any ideas how to further debug this?</p>