Newbie is lost with too many docker-compose.yml - do I have to copy the content of each service in a big single traefik dedicated docker-compose.yml?

Hi there,
I'm confused with the instruction given in Quick Start?
Other docker images, in this case Mattermost Production Docker Deployment, come with their own docker-compose.yml.

How do I need to combine those? Do I have to put all in the same file?
Could be easier for better app handling, couldn't it?
In the quick it says

image: containous/whoami

where I replace containous/whoami by mattermost images

mattermost-docker_web 
mattermost-docker_app 
mattermost-docker_db

don't I?
This won't run the commands given in

mattermost's `docker-compose.yml`
version: "3"

services:

  db:
    build: db
    read_only: true
    restart: unless-stopped
    volumes:
      - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    environment:
      - POSTGRES_USER=mmuser
      - POSTGRES_PASSWORD=mmuser_password
      - POSTGRES_DB=mattermost
    # uncomment the following to enable backup
    #  - AWS_ACCESS_KEY_ID=XXXX
    #  - AWS_SECRET_ACCESS_KEY=XXXX
    #  - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
    #  - AWS_REGION=us-east-1

  app:
    build:
      context: app
      # uncomment following lines for team edition or change UID/GID
      # args:
      #   - edition=team
      #   - PUID=1000
      #   - PGID=1000
    restart: unless-stopped
    volumes:
      - ./volumes/app/mattermost/config:/mattermost/config:rw
      - ./volumes/app/mattermost/data:/mattermost/data:rw
      - ./volumes/app/mattermost/logs:/mattermost/logs:rw
      - ./volumes/app/mattermost/plugins:/mattermost/plugins:rw
      - ./volumes/app/mattermost/client-plugins:/mattermost/client/plugins:rw
      - /etc/localtime:/etc/localtime:ro
    environment:
      # set same as db credentials and dbname
      - MM_USERNAME=mmuser
      - MM_PASSWORD=mmuser_password
      - MM_DBNAME=mattermost

      # use the credentials you've set above, in the format:
      # MM_SQLSETTINGS_DATASOURCE=postgres://${MM_USERNAME}:${MM_PASSWORD}@db:5432/${MM_DBNAME}?sslmode=disable&connect_timeout=10
      - MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:mmuser_password@db:5432/mattermost?sslmode=disable&connect_timeout=10

      # in case your config is not in default location
      #- MM_CONFIG=/mattermost/config/config.json

  web:
    build: web
    ports:
      - "80:80"
      - "443:443"
    read_only: true
    restart: unless-stopped
    volumes:
      # This directory must have cert files if you want to enable SSL
      - ./volumes/web/cert:/cert:ro
      - /etc/localtime:/etc/localtime:ro
    # Uncomment for SSL
    # environment:
    #  - MATTERMOST_ENABLE_SSL=true

So, how do I marry them? Any idea?

you can either put all in a single docker-compose.yml file, what can get quite long, depending on the count of containers you run or you split them in multiple docker-compose files as the folks of API Platform suggest in API Platform: Implement Traefik Into API Platform Dockerized.

When you install Docker Compose, its binary is put in /usr/local/bin/docker-compose, so you can run by typing docker-compose anywhere when using a shell, see Install Docker Compose | Docker Documentation. Docker Compose will search for a 'docker-compose.yml` in the current working directory and its parent directory. If it finds file, it executes it, if not you get

ERROR:
        Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml


I would suggest that you get the basic config for using Traefik V2 with your services (like Mattermost".

Start with this posts: https://containo.us/blog/traefik-2-0-docker-101-fc2893944b9d/

thx for the piece of adice but I have got running traefik dashboard via https and disourse via https :slight_smile: