globals:
  cache:
    s3:
      bucket_name: default_bucket

services:
  tms:
  wmts:
    restful: true
  wms:
    md:
      title: MapProxy S3

layers:
  - name: default
    title: Default
    sources: [default_cache]
  - name: quadkey
    title: Quadkey
    sources: [quadkey_cache]
  - name: reverse
    title: Reverse
    sources: [reverse_cache]
  - name: multiple_grids
    title: Multiple Grids
    sources: [multiple_grids_cache]

caches:
  default_cache:
    grids: [webmercator]
    cache:
      type: s3
    sources: [tms]

  quadkey_cache:
    grids: [webmercator]
    cache:
      type: s3
      bucket_name: tiles
      directory_layout: quadkey
      directory: quadkeytiles
    sources: [tms]

  reverse_cache:
    grids: [webmercator]
    cache:
      type: s3
      bucket_name: tiles
      directory_layout: reverse_tms
      directory: reversetiles
    sources: [tms]

  multiple_grids_cache:
    grids: [webmercator, webmercator2]
    cache:
      type: s3
      bucket_name: tiles
      directory: multiple_grids
      include_grid_name: true
    sources: [tms]

grids:
  webmercator:
    name: WebMerc
    base: GLOBAL_WEBMERCATOR
  webmercator2:
    name: WebMerc2
    base: GLOBAL_WEBMERCATOR


sources:
  tms:
    type: tile
    url: http://localhost:42423/tiles/%(tc_path)s.png

