docker-compose.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # 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. #
  17. version: "3"
  18. services:
  19. apisix:
  20. image: "apache/apisix:${APISIX_DOCKER_TAG}"
  21. restart: always
  22. volumes:
  23. - ../example/apisix_log:/usr/local/apisix/logs
  24. - ../example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
  25. depends_on:
  26. - etcd
  27. ports:
  28. - "9080:9080/tcp"
  29. - "9091:9091/tcp"
  30. - "9443:9443/tcp"
  31. networks:
  32. - apisix
  33. etcd:
  34. image: bitnami/etcd:3.4.9
  35. user: root
  36. restart: always
  37. volumes:
  38. - ../example/etcd_data:/etcd_data
  39. environment:
  40. ETCD_DATA_DIR: /etcd_data
  41. ETCD_ENABLE_V2: "true"
  42. ALLOW_NONE_AUTHENTICATION: "yes"
  43. ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
  44. ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
  45. ports:
  46. - "2379:2379/tcp"
  47. networks:
  48. - apisix
  49. networks:
  50. apisix:
  51. driver: bridge