DokployD
Dokploy13mo ago
3 replies
Kirill

nginx cant access other services in docker compose stack

Locally my compose stack works normally, but when I deploy it to dokploy nginx container cant access other containers in the network. But other containers can access nginx.

Here is my compose file
services:
  nginx:
    build:
      context: ./nginx
      dockerfile: Dockerfile
    depends_on:
      - frontend
      - provider
    networks:
      - frontend
      - dokploy-network
    ports:
      - 80

  frontend:...
    networks:
      - frontend
    ports:
      - 4321

  provider:...
    networks:
      - frontend
      - backend
    ports:
      - 3000

  database:...
    depends_on:
      postgres:
        condition: service_healthy
    networks:
      - frontend
      - backend

  postgres:...

networks:
  frontend:
  backend:
  dokploy-network:
    external: true


Could it be because it whaits to start nginx when other parts of network are ready? It acts as a reverse proxy for local network so it cant be started before other servers are available
image.png
Was this page helpful?