504 Gateway Time-out error from nginx on macvlan

Hi guys,

I acutally change a bit of my environment and put my docker containers into vlans of my local network to be able to control them through my firewall. Already moved a few of my containers and they are working fine.

Now there is this wiki (bookstack) i am using and i cant get it back to work, even with new clean volumes. When i try to access via Browser I get a 504 Gateway Time-out from nginx.

Already tried many things… from changing the env var APP_URL in several ways or only use one volume for both containers.

My last try was to put a link in my compose file, but this also didnt help.
I also can ping the containers on my networks, and they also can ping each other when i enter them. Also allowed any traffic on my firewall for both containers.

The error sounds like a communication problem but I don’t know what is wrong.
I already searched the internet but didn’t find any solution for my setup.

Any suggestions or ideas?

Here is my compose file:

services:
  bookstack:
    image: linuxserver/bookstack:latest
    container_name: bookstack
    hostname: wiki
    networks:
      macvlan50-net:
        ipv4_address: 10.0.5.3
    environment:
      - UID=1009
      - GID=1009
      - TZ=Europe/Berlin
      - APP_URL=http://10.0.5.3:6875
      - DB_HOST=bookstack_db
      - DB_USER=bookstack
      - DB_PASSWORD=Password2
      - DB_DATABASE=bookstackapp
    volumes:
      - data:/config
#   ports:
#     - 6875:80
    restart: always
    depends_on:
      - bookstackdb
    links:
      - bookstackdb
  bookstackdb:
    image: linuxserver/mariadb:latest
    container_name: bookstackdb
    hostname: wikidb
    networks:
      macvlan50-net:
        ipv4_address: 10.0.5.4
    environment:
      - UID=1009
      - GID=1009
      - MYSQL_ROOT_PASSWORD=Password1
      - TZ=Europe/Berlin
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=Password2
    volumes:
      - db:/config
    restart: always
volumes:
  data:
  db:
networks:
  macvlan50-net:
    external: true

Please embed whatever you posted on pastbin in your post and make sure to follow these conventions: How to format your forum posts

External links have the tendency to become invalid/break.

Can your nginx see the network of you containers? If it is a reverse proxy running in a container, doesn’t matter which volume you delete, the nginx proxy will generate its config file automatically. If it can listen on the Docker API and generates the new config containing an IP address that nginx can’t see, you can get gateway timeout.

PS.: I moved the topic from the “Community” category since that is for asking “about” the community, not from the community.