docker-compose.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. restart: always
  30. volumes:
  31. - etcd_data:/bitnami/etcd
  32. environment:
  33. ETCD_ENABLE_V2: "true"
  34. ALLOW_NONE_AUTHENTICATION: "yes"
  35. ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
  36. ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
  37. ports:
  38. - "2379:2379/tcp"
  39. networks:
  40. apisix:
  41. web1:
  42. image: nginx:1.19.0-alpine
  43. restart: always
  44. volumes:
  45. - ./upstream/web1.conf:/etc/nginx/nginx.conf
  46. ports:
  47. - "9081:80/tcp"
  48. environment:
  49. - NGINX_PORT=80
  50. networks:
  51. apisix:
  52. web2:
  53. image: nginx:1.19.0-alpine
  54. restart: always
  55. volumes:
  56. - ./upstream/web2.conf:/etc/nginx/nginx.conf
  57. ports:
  58. - "9082:80/tcp"
  59. environment:
  60. - NGINX_PORT=80
  61. networks:
  62. apisix:
  63. networks:
  64. apisix:
  65. driver: bridge
  66. volumes:
  67. etcd_data:
  68. driver: local