docker-compose.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. version: "3"
  2. services:
  3. apisix-dashboard:
  4. image: apache/apisix-dashboard:2.9.0
  5. restart: always
  6. volumes:
  7. - ./dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
  8. ports:
  9. - "9000:9000"
  10. networks:
  11. apisix:
  12. apisix:
  13. image: apache/apisix:2.10.0-alpine
  14. restart: always
  15. volumes:
  16. - ./apisix_log:/usr/local/apisix/logs
  17. - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
  18. depends_on:
  19. - etcd
  20. ##network_mode: host
  21. ports:
  22. - "9080:9080/tcp"
  23. - "9091:9091/tcp"
  24. - "9443:9443/tcp"
  25. - "9092:9092/tcp"
  26. networks:
  27. apisix:
  28. etcd:
  29. image: bitnami/etcd:3.4.15
  30. restart: always
  31. volumes:
  32. - etcd_data:/bitnami/etcd
  33. environment:
  34. ETCD_ENABLE_V2: "true"
  35. ALLOW_NONE_AUTHENTICATION: "yes"
  36. ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
  37. ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
  38. ports:
  39. - "2379:2379/tcp"
  40. networks:
  41. apisix:
  42. web1:
  43. image: nginx:1.19.0-alpine
  44. restart: always
  45. volumes:
  46. - ./upstream/web1.conf:/etc/nginx/nginx.conf
  47. ports:
  48. - "9081:80/tcp"
  49. environment:
  50. - NGINX_PORT=80
  51. networks:
  52. apisix:
  53. web2:
  54. image: nginx:1.19.0-alpine
  55. restart: always
  56. volumes:
  57. - ./upstream/web2.conf:/etc/nginx/nginx.conf
  58. ports:
  59. - "9082:80/tcp"
  60. environment:
  61. - NGINX_PORT=80
  62. networks:
  63. apisix:
  64. prometheus:
  65. image: prom/prometheus:v2.25.0
  66. restart: always
  67. volumes:
  68. - ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
  69. ports:
  70. - "9090:9090"
  71. networks:
  72. apisix:
  73. grafana:
  74. image: grafana/grafana:7.3.7
  75. restart: always
  76. ports:
  77. - "3000:3000"
  78. volumes:
  79. - "./grafana_conf/provisioning:/etc/grafana/provisioning"
  80. - "./grafana_conf/dashboards:/var/lib/grafana/dashboards"
  81. - "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
  82. networks:
  83. apisix:
  84. networks:
  85. apisix:
  86. driver: bridge
  87. volumes:
  88. etcd_data:
  89. driver: local