services:
  rgallery:
    image: robbymilo/rgallery:latest
    # entrypoint:
    #   - rgallery
    #   - --data=./data # override database directory
    #   - --cache=./cache # override cache directory
    #   - --disable-auth # disable login
    #   - --quality=60 # override thumbnail quality
    #   - --location_dataset=Countries10 # use lower resolution reverse geocode dataset
    #   - --tile_server=https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=<replace-with-your-API-key>
    #   - --include-originals # include originals in web view.
    # platform: linux/arm64
    platform: linux/amd64
    environment:
      - RGALLERY_RESIZE_SERVICE=http://goresize:3001
      - RGALLERY_LOCATION_SERVICE=http://gogeo:3002
    volumes:
      - ./images:/images:ro
      - ./data:/data
      - ./cache:/cache
    ports:
      - 3000:3000

  goresize:
    image: robbymilo/rgallery:resize-latest
    deploy:
      mode: replicated
      replicas: 3
    # platform: linux/arm64
    platform: linux/amd64
    ports:
      - 3001

  gogeo:
    image: robbymilo/rgallery:geo-latest
    # platform: linux/arm64
    platform: linux/amd64
    ports:
      - 3002
