docker-compose.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. version: '2'
  17. services:
  18. zookeeper:
  19. image: zookeeper
  20. restart: always
  21. container_name: zookeeper
  22. ports:
  23. - "2181:2181"
  24. environment:
  25. ZOO_MY_ID: 1
  26. ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
  27. db:
  28. image: postgres
  29. container_name: postgres
  30. environment:
  31. - POSTGRES_USER=test
  32. - POSTGRES_PASSWORD=test
  33. - POSTGRES_DB=dolphinscheduler
  34. ports:
  35. - "5432:5432"
  36. volumes:
  37. - pgdata:/var/lib/postgresql/data
  38. - ./postgres/docker-entrypoint-initdb:/docker-entrypoint-initdb.d
  39. volumes:
  40. pgdata: