'tileserver-gl: custom config file docker-compose

I am trying to include a Tileserver GL container to my existing docker-compose, using a personalized config.json file. Here is the relevant part of the docker-compose.yml

  osm_tile_server:
    image: maptiler/tileserver-gl
    container_name: open_tile_server
    volumes:
      - ./Tile_server/data:/data
    ports:
      - '8081:8080'
      - '5431:5432'
    command:
      - '-c my_config.json'

the data folder structure

.Tile_server/data/
├── malta.bbox
├── malta.osm.pbf
├── my_config.json
├── quickstart_checklist.chk
├── styles
│   └── my_style.json
└── tiles.mbtiles

when running docker-compose up the -c my_config.json file is ignored. However it works if I simply run docker run -it -v $(pwd)/Tile_server/data:/data -p 8081:80 maptiler/tileserver-gl -c my_config.json and even weirdly, if I use --verbose as the command instance instead of -c my_config.json, the option is executed.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source