services:
  rundeck:
    image: rundeck/rundeck:5.17.0
    container_name: rb-rundeck
    tty: true
    volumes:
      - data:/home/rundeck/server/data
      # - ${RUNDECK_LICENSE_FILE:-/dev/null}:/home/rundeck/etc/rundeckpro-license.key
    ports:
      - "${HOST_PORT:-4440}:4440"
    restart: unless-stopped
    healthcheck:
      # Uses curl to check the API system info endpoint.
      # The '-f' flag makes curl return a non-zero exit code on HTTP errors (4xx or 5xx), which Docker interprets as "unhealthy".
      test: ["CMD-SHELL", "curl http://localhost:4440|| exit 1"]
      interval: 5s    
      timeout: 5s     
      retries: 30       
      start_period: 10s

volumes:
  data:
