# $ compose.tools.yaml
name: suitecoffee_tools

services:

  dbeaver:
    image: dbeaver/cloudbeaver:latest
    profiles: [dbeaver]
    ports:
      - 8978:8978
    environment:
      TZ: America/Montevideo
    volumes:
      - dbeaver_logs:/opt/cloudbeaver/logs
      - dbeaver_workspace:/opt/cloudbeaver/workspace
    networks:
      # suitecoffee_prod_net: {}
      suitecoffee_dev_net: {}
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://localhost:8978 || exit 1"]
      interval: 10s
      timeout: 3s
      retries: 10
      start_period: 20s
    restart: unless-stopped

  npm:
    image: jc21/nginx-proxy-manager:latest
    profiles: [npm]
    restart: unless-stopped
    ports:
      - "80:80"      # HTTP público
      - "81:81"      # UI de administración
    environment:
      TZ: America/Montevideo
    volumes:
      - npm_data:/data
      - npm_letsencrypt:/etc/letsencrypt
    networks:
      # suitecoffee_prod_net: {}
      suitecoffee_dev_net: {}
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://localhost:81 || exit 1"]
      interval: 10s
      timeout: 3s
      retries: 10
      start_period: 20s  
    

networks:
  suitecoffee_dev_net:
    external: true
  # suitecoffee_prod_net:
  #   external: true

volumes:
  npm_data:
  npm_letsencrypt:

  dbeaver_logs:
  dbeaver_workspace:
