apisix
This commit is contained in:
1 parent
b68632a50e
commit
31eb2d296d
9 files changed
+12022
No files matched your search
@@ -0,0 +1,101 @@
|
||||
networks:
|
||||
apisix_net:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
# 1. Cơ sở dữ liệu cấu hình cho APISIX
|
||||
etcd:
|
||||
image: bitnamilegacy/etcd:3.5.11
|
||||
container_name: apisix-etcd
|
||||
restart: always
|
||||
volumes:
|
||||
- etcd_data:/bitnami/etcd
|
||||
environment:
|
||||
ETCD_ENABLE_V2: "true"
|
||||
ALLOW_NONE_AUTHENTICATION: "yes"
|
||||
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
|
||||
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
|
||||
networks:
|
||||
- apisix_net
|
||||
|
||||
# 2. Apache APISIX Gateway
|
||||
apisix:
|
||||
image: apache/apisix:3.16.0-debian
|
||||
container_name: apisix-gateway
|
||||
user: "root"
|
||||
restart: always
|
||||
volumes:
|
||||
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml
|
||||
depends_on:
|
||||
- etcd
|
||||
networks:
|
||||
- apisix_net
|
||||
ports:
|
||||
- "9080:9080" # HTTP Traffic
|
||||
- "9443:9443" # HTTPS Traffic
|
||||
- "9180:9180" # Admin API
|
||||
|
||||
# 3. APISIX Dashboard (Đổi sang cổng 9090)
|
||||
apisix-dashboard:
|
||||
image: apache/apisix-dashboard:3.0.1-alpine
|
||||
container_name: apisix-dashboard
|
||||
restart: always
|
||||
volumes:
|
||||
- ./apisix_conf/dashboard_conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
|
||||
- ./apisix_conf/schema.json:/usr/local/apisix-dashboard/conf/schema.json:ro
|
||||
depends_on:
|
||||
- etcd
|
||||
networks:
|
||||
- apisix_net
|
||||
ports:
|
||||
- "9090:9090"
|
||||
|
||||
# 4. Grafana Loki (Đổi sang cổng 9100)
|
||||
loki:
|
||||
image: grafana/loki:3.0.0
|
||||
container_name: apisix-loki
|
||||
restart: always
|
||||
volumes:
|
||||
- loki_data:/tmp/loki
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
networks:
|
||||
- apisix_net
|
||||
|
||||
# 5. Promtail (Thu thập log gửi sang Loki)
|
||||
promtail:
|
||||
image: grafana/promtail:3.0.0
|
||||
container_name: apisix-promtail
|
||||
restart: always
|
||||
volumes:
|
||||
- ./promtail_conf/promtail-config.yaml:/etc/promtail/config.yml:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
command: -config.file=/etc/promtail/config.yml
|
||||
depends_on:
|
||||
- loki
|
||||
networks:
|
||||
- apisix_net
|
||||
|
||||
# 6. Grafana (Đổi sang cổng 9300)
|
||||
grafana:
|
||||
image: grafana/grafana:11.0.0
|
||||
container_name: apisix-grafana
|
||||
restart: always
|
||||
environment:
|
||||
- GF_SECURITY_ALLOW_EMBEDDING=true
|
||||
ports:
|
||||
- "9300:3000"
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
- ./grafana_conf/provisioning:/etc/grafana/provisioning:ro
|
||||
depends_on:
|
||||
- loki
|
||||
networks:
|
||||
- apisix_net
|
||||
|
||||
volumes:
|
||||
etcd_data:
|
||||
driver: local
|
||||
loki_data:
|
||||
driver: local
|
||||
grafana_data:
|
||||
driver: local
|
||||
Reference in new issue
Block a user