compose.yaml 848 B

12345678910111213141516171819202122232425262728
  1. ---
  2. # (Optional) when using custom network
  3. # networks:
  4. # yournetwork:
  5. # external: true
  6. volumes:
  7. mariadb-data:
  8. services:
  9. mariadb:
  10. image: docker.io/library/mariadb:11.8.2
  11. # (Optional) remove this section when you don't want to expose
  12. ports:
  13. - 3306:3306
  14. environment:
  15. # (Optional) remove this section, when using random, or empty root password
  16. - MARIADB_ROOT_PASSWORD=your-root-password
  17. # (Optional) when using random, or empty root password
  18. # - MARIADB_RANDOM_ROOT_PASSWORD=true
  19. # - MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true
  20. - MARIADB_DATABASE=your-database
  21. - MARIADB_USER=your-user
  22. - MARIADB_PASSWORD=your-password
  23. volumes:
  24. - mariadb-data:/var/lib/mysql
  25. # (Optional) when using custom network
  26. # networks:
  27. # - yournetwork
  28. restart: unless-stopped