version: "3.9" services: bridge: image: maven:3.8.1-jdk-8 container_name: bridge2 restart: always environment: - PORT=9091 labels: - autoheal=true working_dir: /usr/src/mymaven volumes: - ./ipphone-bridge:/usr/src/mymaven - ./.m2:/root/.m2 ports: - "9091:9091" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9091/actuator/health"] interval: 10s timeout: 10s retries: 3 start_period: 60s command: mvn spring-boot:run autoheal: image: willfarrell/autoheal container_name: autoheal-bridge2 volumes: - '/var/run/docker.sock:/var/run/docker.sock' environment: - AUTOHEAL_INTERVAL=10 - CURL_TIMEOUT=30