docker-compose.postgres.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright © 2016-2022 The Thingsboard Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. version: '2.2'
  17. services:
  18. postgres:
  19. restart: always
  20. image: "postgres:12"
  21. ports:
  22. - "5432"
  23. environment:
  24. POSTGRES_DB: thingsboard
  25. POSTGRES_PASSWORD: postgres
  26. volumes:
  27. - ./tb-node/postgres:/var/lib/postgresql/data
  28. tb-core1:
  29. env_file:
  30. - tb-node.postgres.env
  31. depends_on:
  32. - zookeeper
  33. - redis
  34. - postgres
  35. tb-core2:
  36. env_file:
  37. - tb-node.postgres.env
  38. depends_on:
  39. - zookeeper
  40. - redis
  41. - postgres
  42. tb-rule-engine1:
  43. env_file:
  44. - tb-node.postgres.env
  45. depends_on:
  46. - zookeeper
  47. - redis
  48. - postgres
  49. tb-rule-engine2:
  50. env_file:
  51. - tb-node.postgres.env
  52. depends_on:
  53. - zookeeper
  54. - redis
  55. - postgres