docker-compose.yml 746 B

12345678910111213141516171819202122232425262728293031
  1. version: "3.9"
  2. services:
  3. bridge:
  4. image: maven:3.8.1-jdk-8
  5. container_name: bridge2
  6. restart: always
  7. environment:
  8. - PORT=9091
  9. labels:
  10. - autoheal=true
  11. working_dir: /usr/src/mymaven
  12. volumes:
  13. - ./ipphone-bridge:/usr/src/mymaven
  14. - ./.m2:/root/.m2
  15. ports:
  16. - "9091:9091"
  17. healthcheck:
  18. test: ["CMD", "curl", "-f", "http://localhost:9091/actuator/health"]
  19. interval: 10s
  20. timeout: 10s
  21. retries: 3
  22. start_period: 60s
  23. command: mvn spring-boot:run
  24. autoheal:
  25. image: willfarrell/autoheal
  26. container_name: autoheal-bridge2
  27. volumes:
  28. - '/var/run/docker.sock:/var/run/docker.sock'
  29. environment:
  30. - AUTOHEAL_INTERVAL=10
  31. - CURL_TIMEOUT=30