docker-compose.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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.6"
  18. services:
  19. etcd:
  20. image: bitnami/etcd:3.5
  21. environment:
  22. - ALLOW_NONE_AUTHENTICATION=yes
  23. - ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
  24. - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
  25. ports:
  26. - "2379:2379"
  27. networks:
  28. apisix_dashboard_e2e:
  29. ipv4_address: 172.16.238.10
  30. upstream:
  31. image: johz/upstream:v2.0
  32. restart: always
  33. volumes:
  34. - ./upstream.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
  35. ports:
  36. - '80:80/tcp'
  37. - '1980:1980/tcp'
  38. - '1981:1981/tcp'
  39. - '1982:1982/tcp'
  40. - '1983:1983/tcp'
  41. - '1984:1984/tcp'
  42. - '1991:1991/tcp'
  43. - '1992:1992/udp'
  44. networks:
  45. apisix_dashboard_e2e:
  46. ipv4_address: 172.16.238.20
  47. upstream_grpc:
  48. image: grpc_server_example
  49. restart: always
  50. ports:
  51. - '50051:50051'
  52. - '50052:50052'
  53. networks:
  54. apisix_dashboard_e2e:
  55. ipv4_address: 172.16.238.21
  56. upstream_httpbin:
  57. image: kennethreitz/httpbin
  58. networks:
  59. apisix_dashboard_e2e:
  60. ipv4_address: 172.16.238.22
  61. apisix:
  62. hostname: apisix_server1
  63. image: apache/apisix:3.0.0-debian
  64. restart: always
  65. volumes:
  66. - ./apisix_config.yaml:/usr/local/apisix/conf/config.yaml:ro
  67. - ./apisix_logs:/usr/local/apisix/logs
  68. depends_on:
  69. - etcd
  70. ports:
  71. - '9080:9080/tcp'
  72. - '9090:9090/tcp'
  73. - '9091:9091/tcp'
  74. - '9443:9443/tcp'
  75. - '9180:9180/tcp'
  76. - '10090:10090/tcp'
  77. - '10091:10091/tcp'
  78. - '10092:10092/tcp'
  79. - '10093:10093/tcp'
  80. - '10095:10095/udp'
  81. networks:
  82. apisix_dashboard_e2e:
  83. ipv4_address: 172.16.238.30
  84. apisix2:
  85. hostname: apisix_server2
  86. image: apache/apisix:3.0.0-debian
  87. restart: always
  88. volumes:
  89. - ./apisix_config2.yaml:/usr/local/apisix/conf/config.yaml:ro
  90. depends_on:
  91. - etcd
  92. ports:
  93. - '9081:9080/tcp'
  94. - '9181:9180/tcp'
  95. networks:
  96. apisix_dashboard_e2e:
  97. ipv4_address: 172.16.238.31
  98. managerapi:
  99. build:
  100. context: ../../
  101. dockerfile: test/docker/Dockerfile
  102. restart: always
  103. volumes:
  104. - ../../conf/conf.yaml:/go/manager-api/conf/conf.yaml:ro
  105. - ../testdata:/go/manager-api/testdata
  106. depends_on:
  107. - etcd
  108. ports:
  109. - '9000:9000/tcp'
  110. networks:
  111. apisix_dashboard_e2e:
  112. ipv4_address: 172.16.238.40
  113. keycloak:
  114. image: jboss/keycloak:9.0.2
  115. environment:
  116. - KEYCLOAK_USER=admin
  117. - KEYCLOAK_PASSWORD=admin
  118. - DB_VENDOR=h2
  119. ports:
  120. - "8080:8080"
  121. networks:
  122. apisix_dashboard_e2e:
  123. driver: bridge
  124. ipam:
  125. driver: default
  126. config:
  127. - subnet: 172.16.238.0/24