I am a bit confused right now I have 3 containers in a compose file, two have traefik labels and only one of them is working the other is giving a 404. Any chance someone can let me know what i am doing wrong?
Note: The 1st service (nextcloud) is working, the 3rd service (phpmyadmin) is the one that is giving me a 404 error. They both show up in the traefik dashboard and If i hit the backend IP for the phpmyadmin service it is up and running
If it helps, I am running traefik 2.2.1
version: "3.7"
services:
nextcloud:
# https://hub.docker.com/r/linuxserver/nextcloud
container_name: nextcloud
image: linuxserver/nextcloud
env_file: .env
environment:
- MYSQL_HOST=nextclouddb
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=xxxxxxx
- MYSQL_DATABASE=nextcloud
- NEXTCLOUD_ADMIN_USER=nextcloudadmin
- NEXTCLOUD_ADMIN_PASSWORD=xxxxxxx
volumes:
- ./data/nextcloud:/config
- ./data/db:/data
- ./init/custom-cont-init.d:/config/custom-cont-init.d
- ./init/config:/root/config.tmp
networks:
- data
depends_on:
- nextclouddb
security_opt:
- no-new-privileges:true
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "traefik.enable=true"
- "traefik.docker.network=data"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.home.local`)"
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.routers.nextcloud.service=nextcloud"
- "traefik.http.services.nextcloud.loadbalancer.server.port=443"
- "traefik.http.services.nextcloud.loadbalancer.server.scheme=https"
restart: unless-stopped
nextclouddb:
# https://hub.docker.com/r/linuxserver/mariadb
container_name: nextclouddb
image: linuxserver/mariadb:latest
hostname: nextclouddb
env_file: .env
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxx
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=xxxxxxx
volumes:
- ./data/db:/config
networks:
- data
security_opt:
- no-new-privileges:true
labels:
- "com.centurylinklabs.watchtower.enable=true"
restart: unless-stopped
nextclouddb-phpmyadmin:
# https://hub.docker.com/r/phpmyadmin/phpmyadmin
container_name: nextclouddb-phpmyadmin
image: phpmyadmin/phpmyadmin:latest
env_file: .env
environment:
- PMA_ABSOLUTE_URI=https://nextcloud-phpmyadmin.home.local
- PMA_ARBITRARY=1
- PMA_HOST=nextclouddb
- PMA_USER=nextcloud
- PMA_PASSWORD=xxxxxxx
- MYSQL_ROOT_PASSWORD=xxxxxxx
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=xxxxxxx
volumes:
- ./data/myadmin:/var/lib/mysql
networks:
- data
depends_on:
- nextclouddb
security_opt:
- no-new-privileges:true
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "traefik.enable=true"
- "traefik.docker.network=data"
- "traefik.http.routers.nextclouddb-phpmyadmin.entrypoints=websecure"
- "traefik.http.routers.nextclouddb-phpmyadmin.rule=Host(`nextcloud-phpmyadmin.home.local`)"
- "traefik.http.routers.nextclouddb-phpmyadmin.tls=false"
- "traefik.http.routers.nextclouddb-phpmyadmin.service=nextclouddb-phpmyadmin"
- "traefik.http.services.nextclouddb-phpmyadmin.loadbalancer.server.port=80"
- "traefik.http.services.nextclouddb-phpmyadmin.loadbalancer.server.scheme=http"
restart: unless-stopped
networks:
data:
external: true