docker-compose.yml 512 B

123456789101112131415161718192021
  1. version: '3.8'
  2. services:
  3. db:
  4. image: mariadb:10.6 # pinned to stable release
  5. container_name: db
  6. volumes:
  7. - ./data/mysql:/var/lib/mysql/
  8. - ./data/backup:/mnt/backup
  9. restart: on-failure:3
  10. environment:
  11. MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
  12. healthcheck:
  13. test: ["CMD", "/usr/local/bin/healthcheck.sh", "--connect"]
  14. interval: 15s #interval for the first and subsequent checks
  15. timeout: 10s
  16. retries: 3
  17. networks:
  18. db_default:
  19. external: true