compose.yaml 907 B

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