docker-compose.hbs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # INFORMATION
  2. # We are not exposing the default ports for the services in this file.
  3. # This is to avoid conflicts with existing services on your machine.
  4. # In case you don't have any services running on the default ports, you can expose them by changing the
  5. # ports section in the services block. Please don't forget to update the ports in the .env file as well.
  6. services:
  7. postgres_db:
  8. image: postgres:16-alpine
  9. volumes:
  10. - postgres_db_data:/var/lib/postgresql/data
  11. ports:
  12. - "6543:5432"
  13. environment:
  14. POSTGRES_DB: {{{ escapeSingle dbName }}}
  15. POSTGRES_USER: {{{ escapeSingle dbUserName }}}
  16. POSTGRES_PASSWORD: {{{ escapeSingle dbPassword }}}
  17. labels:
  18. - "io.vendure.create.name={{{ escapeSingle name }}}"
  19. mysql_db:
  20. image: mysql:8
  21. volumes:
  22. - mysql_db_data:/var/lib/mysql
  23. environment:
  24. MYSQL_ROOT_PASSWORD: 'ROOT'
  25. MYSQL_DATABASE: {{{ escapeSingle dbName }}}
  26. MYSQL_USER: {{{ escapeSingle dbUserName }}}
  27. MYSQL_PASSWORD: {{{ escapeSingle dbPassword }}}
  28. ports:
  29. - "4306:3306"
  30. labels:
  31. - "io.vendure.create.name={{{ escapeSingle name }}}"
  32. mariadb_db:
  33. image: mariadb:10
  34. volumes:
  35. - mariadb_db_data:/var/lib/mysql
  36. environment:
  37. MARIADB_ROOT_PASSWORD: 'ROOT'
  38. MARIADB_DATABASE: {{{ escapeSingle dbName }}}
  39. MARIADB_USER: {{{ escapeSingle dbUserName }}}
  40. MARIADB_PASSWORD: {{{ escapeSingle dbPassword }}}
  41. ports:
  42. - "3306:3306"
  43. labels:
  44. - "io.vendure.create.name={{{ escapeSingle name }}}"
  45. # RECOMMENDED (especially for production)
  46. # Want to use our BullMQ with Redis instead of our default database job queue?
  47. # Checkout our BullMQ plugin: https://docs.vendure.io/reference/core-plugins/job-queue-plugin/bull-mqjob-queue-plugin/
  48. redis:
  49. image: redis:7-alpine
  50. ports:
  51. - "6479:6379"
  52. volumes:
  53. - redis_data:/data
  54. labels:
  55. - "io.vendure.create.name={{{ escapeSingle name }}}"
  56. # RECOMMENDED
  57. # Want to use Typesense instead of our default search engine?
  58. # Checkout our advanced search plugin: https://vendure.io/hub/vendure-plus-advanced-search-plugin
  59. # To run the typesense container run "docker compose up -d typesense"
  60. typesense:
  61. image: typesense/typesense:27.0
  62. command: [ '--data-dir', '/data', '--api-key', 'SuperSecret' ]
  63. ports:
  64. - "8208:8108"
  65. volumes:
  66. - typesense_data:/data
  67. labels:
  68. - "io.vendure.create.name={{{ escapeSingle name }}}"
  69. # Want to use Elasticsearch instead of our default database engine?
  70. # Checkout our Elasticsearch plugin: https://docs.vendure.io/reference/core-plugins/elasticsearch-plugin/
  71. # To run the elasticsearch container run "docker compose up -d elasticsearch"
  72. elasticsearch:
  73. image: docker.elastic.co/elasticsearch/elasticsearch:9.1.0
  74. container_name: elasticsearch
  75. environment:
  76. - node.name=es
  77. - cluster.name=es-docker-cluster
  78. - xpack.security.enabled=false
  79. - xpack.security.http.ssl.enabled=false
  80. - xpack.security.transport.ssl.enabled=false
  81. - xpack.license.self_generated.type=basic
  82. - discovery.type=single-node
  83. - bootstrap.memory_lock=true
  84. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  85. mem_limit: 536870912
  86. ulimits:
  87. memlock:
  88. soft: -1
  89. hard: -1
  90. volumes:
  91. - elasticsearch_data:/usr/share/elasticsearch/data
  92. ports:
  93. - 9200:9200
  94. labels:
  95. - "io.vendure.create.name={{{ escapeSingle name }}}"
  96. volumes:
  97. postgres_db_data:
  98. driver: local
  99. labels:
  100. - "io.vendure.create.name={{{ escapeSingle name }}}"
  101. mysql_db_data:
  102. driver: local
  103. labels:
  104. - "io.vendure.create.name={{{ escapeSingle name }}}"
  105. mariadb_db_data:
  106. driver: local
  107. labels:
  108. - "io.vendure.create.name={{{ escapeSingle name }}}"
  109. typesense_data:
  110. driver: local
  111. labels:
  112. - "io.vendure.create.name={{{ escapeSingle name }}}"
  113. elasticsearch_data:
  114. driver: local
  115. labels:
  116. - "io.vendure.create.name={{{ escapeSingle name }}}"
  117. redis_data:
  118. driver: local
  119. labels:
  120. - "io.vendure.create.name={{{ escapeSingle name }}}"