hi, i'm looking for help. I try to configure traefik with over containers.
I create two docker-compose files one for traefik and an other for nextcloud and database. I use a VM for my docker's projet.
I can connect to traefik with the VM ip adress but i can't access to nextcloud.
version: '3'
services:
traefik:
image: traefik:v2.0
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- webgateway
networks:
webgateway:
driver: bridge
docker conteneur nextcloud et db
version: "3"
services:
db:
ports:
- 3306:3306
image: linuxserver/mariadb
container_name: databases
volumes:
- /sharedfolders/cloud/databases:/config
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_PASSWORD: password
networks:
- nextcloud
nextcloud:
depends_on:
- db
image: linuxserver/nextcloud
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Paris
volumes:
- /sharedfolders/cloud/nextcloud/config:/config
- /sharedfolders/cloud/nextcloud/data:/data
expose:
- 80
restart: unless-stopped
networks:
- nextcloud
- webgateway
labels:
- traefik.http.routers.nextcloud.rule=Host(`cloud.debian.test`)
networks:
nextcloud:
webgateway:
external:
name: traefik_webgateway