version: '3'

services:

  pgadmin:
    image: dpage/pgadmin4:4.23
    container_name: "thirdparty-pgadmin"
    restart: "always"
    external_links:
      - "postgres:postgres-host"
    environment:
      PGADMIN_DEFAULT_EMAIL: "admin"
      PGADMIN_DEFAULT_PASSWORD: "pgadmin-pass"
    ports:
      - "851:80"
    volumes:
      - pgadmin-data:/var/lib/pgadmin
    networks:
      - medicine-network
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

  filebrowser:
    image: filebrowser/filebrowser
    container_name: "thirdparty-filebrowser"
    restart: "always"
    ports:
      - "856:80"
    volumes:
      - filebrowser-data:/etc
      - ../volumes/files:/srv/volumes
    networks:
      - medicine-network
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

  flower:
    restart: "always"
    container_name: "thirdparty-flower"
    command: >
      flower
      --port=852
      --broker=redis://redis-host:6379/2
      --broker_api=redis://redis-host:6379/2
      --basic_auth=admin:flower-pass
      --max_workers=2
      --max_tasks=500
    build:
      context: ./
      dockerfile: ./Dockerfile-flower
    external_links:
      - "redis:redis-host"
    networks:
      - medicine-network
    ports:
      - "852:852"
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

volumes:
  pgadmin-data:
  filebrowser-data:

networks:
  medicine-network:
    external:
      name: "medicine-network"
