docker-compose.hbs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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:7.1.1
  74. environment:
  75. discovery.type: single-node
  76. bootstrap.memory_lock: true
  77. ES_JAVA_OPTS: -Xms512m -Xmx512m
  78. volumes:
  79. - elasticsearch_data:/usr/share/elasticsearch/data
  80. ports:
  81. - "9300:9200"
  82. labels:
  83. - "io.vendure.create.name={{{ escapeSingle name }}}"
  84. volumes:
  85. postgres_db_data:
  86. driver: local
  87. labels:
  88. - "io.vendure.create.name={{{ escapeSingle name }}}"
  89. mysql_db_data:
  90. driver: local
  91. labels:
  92. - "io.vendure.create.name={{{ escapeSingle name }}}"
  93. mariadb_db_data:
  94. driver: local
  95. labels:
  96. - "io.vendure.create.name={{{ escapeSingle name }}}"
  97. typesense_data:
  98. driver: local
  99. labels:
  100. - "io.vendure.create.name={{{ escapeSingle name }}}"
  101. elasticsearch_data:
  102. driver: local
  103. labels:
  104. - "io.vendure.create.name={{{ escapeSingle name }}}"
  105. redis_data:
  106. driver: local
  107. labels:
  108. - "io.vendure.create.name={{{ escapeSingle name }}}"