Múltiples Docker-Compose-Files para servicios y proxy inversos

Múltiples Docker-Compose-Files para servicios y proxy inversos

He creado dos archivos docker-compose, el primero crea un nginx-proxy y un letsencrypt-nginx-proxy-companion. El otro archivo yaml crea una instancia de nextcloud (con mariadb). Los dos primeros contenedores se inician sin error y funcionan, pero después de iniciar el segundo archivo de redacción, aparece la siguiente advertencia:

Found orphan containers (test-proxy, test-letsencrypt) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.

Estos son mis archivos de redacción:

nginx-prueba.yml

version: '3.5' 

services:

  proxy:
    image: jwilder/nginx-proxy:alpine
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
    container_name: test-proxy
    networks:
      - testnet
    ports:
      - 80:80
      - 443:443
    volumes:
      - /srv/proxy/conf.d:/etc/nginx/conf.d:rw
      - /srv/proxy/vhost.d:/etc/nginx/vhost.d:rw
      - /srv/proxy/html:/usr/share/nginx/html:rw
      - /srv/proxy/certs:/etc/nginx/certs:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    restart: unless-stopped

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: test-letsencrypt
    depends_on:
      - proxy
    networks:
      - testnet
    volumes:
      - /srv/proxy/certs:/etc/nginx/certs:rw
      - /srv/proxy/vhost.d:/etc/nginx/vhost.d:rw
      - /srv/proxy/html:/usr/share/nginx/html:rw
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped

networks:
  testnet:

nextcloud-test.yml

version: '3.5' 

services:

  db:
    image: mariadb
    container_name: nextcloud-mariadb
    networks:
      - testnet
    volumes:
      - db:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=test
      - MYSQL_PASSWORD=test
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    restart: unless-stopped

  app:
    image: nextcloud:latest
    container_name: nextcloud-test
    networks:
      - testnet
    depends_on:
      - db
    volumes:
      - nextcloud:/var/www/html
      - /srv/nextcloud/config:/var/www/html/config
      - /srv/app/custom_apps:/var/www/html/custom_apps
      - /srv/app/data:/var/www/html/data
      - /srv/app/themes:/var/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=nextcloud.localhost
      - LETSENCRYPT_HOST=nextcloud.localhost
      - [email protected]
    restart: unless-stopped

volumes:
  nextcloud:
  db:

networks:
  testnet:

Si inicio los cuatro contenedores en un archivo yml, todo comienza y puedo acceder a nextcloud en nextcloud.localhost. ¿Qué debo cambiar en mis archivos yml para que los cuatro contenedores puedan interactuar entre sí?

información relacionada