fix: apisix adjust
This commit is contained in:
parent
cf279e9b73
commit
4aea4f36f1
|
@ -20,22 +20,30 @@ version: "3.8"
|
||||||
services:
|
services:
|
||||||
apisix-dashboard:
|
apisix-dashboard:
|
||||||
image: apache/apisix-dashboard:latest
|
image: apache/apisix-dashboard:latest
|
||||||
container_name: 'apisix-dashboard'
|
|
||||||
hostname: 'apisix-dashboard'
|
hostname: 'apisix-dashboard'
|
||||||
restart: always
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./apisix/dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
|
- ./apisix/dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
|
||||||
ports:
|
ports:
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
cpus: '0.05'
|
||||||
|
memory: 100M
|
||||||
|
limits:
|
||||||
|
cpus: '0.30'
|
||||||
|
memory: 300M
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- 'node.role == manager'
|
||||||
networks:
|
networks:
|
||||||
- apisix
|
|
||||||
- diyue-network
|
- diyue-network
|
||||||
|
|
||||||
apisix:
|
apisix:
|
||||||
image: apache/apisix:latest
|
image: apache/apisix:latest
|
||||||
container_name: 'apisix'
|
|
||||||
hostname: 'apisix'
|
hostname: 'apisix'
|
||||||
restart: always
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./apisix/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
|
- ./apisix/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -47,15 +55,25 @@ services:
|
||||||
- "9091:9091/tcp"
|
- "9091:9091/tcp"
|
||||||
- "9443:9443/tcp"
|
- "9443:9443/tcp"
|
||||||
- "9092:9092/tcp"
|
- "9092:9092/tcp"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
cpus: '0.10'
|
||||||
|
memory: 200M
|
||||||
|
limits:
|
||||||
|
cpus: '0.30'
|
||||||
|
memory: 400M
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- 'node.role == manager'
|
||||||
networks:
|
networks:
|
||||||
- apisix
|
|
||||||
- diyue-network
|
- diyue-network
|
||||||
|
|
||||||
etcd:
|
etcd:
|
||||||
image: bitnami/etcd:latest
|
image: bitnami/etcd:latest
|
||||||
container_name: 'apisix-etcd'
|
|
||||||
hostname: 'apisix-etcd'
|
hostname: 'apisix-etcd'
|
||||||
restart: always
|
|
||||||
volumes:
|
volumes:
|
||||||
- etcd_data:/bitnami/etcd
|
- etcd_data:/bitnami/etcd
|
||||||
environment:
|
environment:
|
||||||
|
@ -65,41 +83,71 @@ services:
|
||||||
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
|
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
|
||||||
ports:
|
ports:
|
||||||
- "2379:2379/tcp"
|
- "2379:2379/tcp"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
cpus: '0.05'
|
||||||
|
memory: 150M
|
||||||
|
limits:
|
||||||
|
cpus: '0.30'
|
||||||
|
memory: 300M
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- 'node.role == manager'
|
||||||
networks:
|
networks:
|
||||||
- apisix
|
|
||||||
- diyue-network
|
- diyue-network
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus:latest
|
image: prom/prometheus:latest
|
||||||
container_name: 'apisix-prometheus'
|
|
||||||
hostname: 'apisix-prometheus'
|
hostname: 'apisix-prometheus'
|
||||||
restart: always
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./apisix/prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./apisix/prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
ports:
|
ports:
|
||||||
- "9093:9090"
|
- "9093:9090"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
cpus: '0.05'
|
||||||
|
memory: 150M
|
||||||
|
limits:
|
||||||
|
cpus: '0.30'
|
||||||
|
memory: 300M
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- 'node.role == manager'
|
||||||
networks:
|
networks:
|
||||||
- apisix
|
|
||||||
- diyue-network
|
- diyue-network
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
container_name: 'apisix-grafana'
|
|
||||||
hostname: 'apisix-grafana'
|
hostname: 'apisix-grafana'
|
||||||
restart: always
|
|
||||||
ports:
|
ports:
|
||||||
- "3010:3000"
|
- "3010:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- "./apisix/grafana_conf/provisioning:/etc/grafana/provisioning"
|
- "./apisix/grafana_conf/provisioning:/etc/grafana/provisioning"
|
||||||
- "./apisix/grafana_conf/dashboards:/var/lib/grafana/dashboards"
|
- "./apisix/grafana_conf/dashboards:/var/lib/grafana/dashboards"
|
||||||
- "./apisix/grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
|
- "./apisix/grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
cpus: '0.05'
|
||||||
|
memory: 150M
|
||||||
|
limits:
|
||||||
|
cpus: '0.30'
|
||||||
|
memory: 300M
|
||||||
|
update_config:
|
||||||
|
failure_action: rollback
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- 'node.role == manager'
|
||||||
networks:
|
networks:
|
||||||
- apisix
|
|
||||||
- diyue-network
|
- diyue-network
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
apisix:
|
|
||||||
driver: bridge
|
|
||||||
diyue-network:
|
diyue-network:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
attachable: true
|
attachable: true
|
||||||
|
|
Loading…
Reference in New Issue