chassis-agent/docker-compose-apisix.yml

153 lines
3.7 KiB
YAML
Raw Normal View History

2023-05-29 16:46:03 +08:00
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
2024-02-04 17:27:41 +08:00
version: "3.8"
2023-05-29 16:46:03 +08:00
services:
apisix-dashboard:
image: apache/apisix-dashboard:latest
volumes:
2023-07-02 04:29:36 +08:00
- ./apisix/dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
2023-05-29 16:46:03 +08:00
ports:
- "9000:9000"
2024-02-05 15:40:25 +08:00
deploy:
resources:
reservations:
cpus: '0.05'
memory: 100M
limits:
2024-03-10 13:10:47 +08:00
cpus: '0.20'
2024-03-01 18:55:49 +08:00
memory: 500M
2024-02-05 15:40:25 +08:00
update_config:
failure_action: rollback
placement:
constraints:
- 'node.role == manager'
2023-05-29 16:46:03 +08:00
networks:
2024-02-04 17:41:35 +08:00
- diyue-network
2023-05-29 16:46:03 +08:00
apisix:
2024-01-27 17:17:06 +08:00
image: apache/apisix:latest
2023-05-29 16:46:03 +08:00
volumes:
2023-07-02 04:29:36 +08:00
- ./apisix/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
2023-05-29 16:46:03 +08:00
depends_on:
- etcd
##network_mode: host
ports:
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
2024-02-05 15:40:25 +08:00
deploy:
resources:
reservations:
cpus: '0.10'
memory: 200M
limits:
2024-03-10 13:10:47 +08:00
cpus: '0.45'
memory: 1024M
2024-02-05 15:40:25 +08:00
update_config:
failure_action: rollback
placement:
constraints:
- 'node.role == manager'
2023-05-29 16:46:03 +08:00
networks:
2024-02-04 17:27:41 +08:00
- diyue-network
2023-05-29 16:46:03 +08:00
etcd:
image: bitnami/etcd:latest
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
2024-03-10 13:38:32 +08:00
ETCD_ADVERTISE_CLIENT_URLS: "http://localhost:2379"
2023-05-29 16:46:03 +08:00
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
2024-02-05 15:40:25 +08:00
deploy:
resources:
reservations:
cpus: '0.05'
memory: 150M
limits:
cpus: '0.30'
2024-03-10 13:10:47 +08:00
memory: 800M
2024-02-05 15:40:25 +08:00
update_config:
failure_action: rollback
placement:
constraints:
- 'node.role == manager'
2023-05-29 16:46:03 +08:00
networks:
2024-02-04 17:41:35 +08:00
- diyue-network
2023-05-29 16:46:03 +08:00
prometheus:
image: prom/prometheus:latest
volumes:
2023-07-02 04:29:36 +08:00
- ./apisix/prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
2023-05-29 16:46:03 +08:00
ports:
- "9093:9090"
2024-02-05 15:40:25 +08:00
deploy:
resources:
reservations:
cpus: '0.05'
memory: 150M
limits:
cpus: '0.30'
2024-03-10 13:10:47 +08:00
memory: 400M
2024-02-05 15:40:25 +08:00
update_config:
failure_action: rollback
placement:
constraints:
- 'node.role == manager'
2023-05-29 16:46:03 +08:00
networks:
2024-02-04 17:41:35 +08:00
- diyue-network
2023-05-29 16:46:03 +08:00
grafana:
image: grafana/grafana:latest
ports:
- "3010:3000"
volumes:
2023-07-02 04:29:36 +08:00
- "./apisix/grafana_conf/provisioning:/etc/grafana/provisioning"
- "./apisix/grafana_conf/dashboards:/var/lib/grafana/dashboards"
- "./apisix/grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
2024-02-05 15:40:25 +08:00
deploy:
resources:
reservations:
cpus: '0.05'
memory: 150M
limits:
cpus: '0.30'
2024-03-10 13:10:47 +08:00
memory: 400M
2024-02-05 15:40:25 +08:00
update_config:
failure_action: rollback
placement:
constraints:
- 'node.role == manager'
2023-05-29 16:46:03 +08:00
networks:
2024-02-04 17:41:35 +08:00
- diyue-network
2023-05-29 16:46:03 +08:00
networks:
2024-02-04 17:27:41 +08:00
diyue-network:
driver: overlay
attachable: true
2023-05-29 16:46:03 +08:00
volumes:
etcd_data:
driver: local