docker-compose.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. version: "3"
  2. services:
  3. apisix-dashboard:
  4. image: apache/apisix-dashboard:2.7
  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.6-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. networks:
  26. apisix:
  27. etcd:
  28. image: bitnami/etcd:3.4.15
  29. user: root
  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. networks:
  65. apisix:
  66. driver: bridge