Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions example/apisix-complete-stack/apisix_conf/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# 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.
#

apisix:
node_listen: 9080 # APISIX listening port
enable_ipv6: false

enable_control: true

control:
ip: "0.0.0.0"
port: 9092

deployment:
admin:
allow_admin: # https://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 127.0.0.1
- ::1
admin_key:
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin # admin: manage all configuration data

- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer

etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://etcd:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds

plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
56 changes: 56 additions & 0 deletions example/apisix-complete-stack/apisix_dashboard_conf/conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# 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.
#

conf:
listen:
host: 0.0.0.0 # `manager api` listening ip or host name
port: 9000 # `manager api` listening port
etcd:
endpoints: # supports defining multiple etcd host addresses for an etcd cluster
- etcd:2379

allow_list:
- 127.0.0.1
- ::1

# etcd basic auth info
# username: "root" # ignore etcd username if not enable etcd auth
# password: "123456" # ignore etcd password if not enable etcd auth

log:
error_log:
level: warn # supports levels, lower to higher: debug, info, warn, error, panic, fatal
file_path:
logs/error.log # supports relative path, absolute path, standard output
# such as: logs/error.log, /tmp/logs/error.log, /dev/stdout, /dev/stderr
authentication:
secret:
secret # secret for jwt token generation.
# NOTE: Highly recommended to modify this value to protect `manager api`.
# if it's default value, when `manager api` start, it will generate a random string to replace it.
expire_time: 3600 # jwt token expire time, in second
users:
- username: admin # username and password for login `manager api`
password: '2]~8+y+T9hEAqCc,3[Ylwf/R-x_'
- username: user
password: user

plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
104 changes: 104 additions & 0 deletions example/apisix-complete-stack/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
version: "3"

services:
apisix:
image: apache/apisix:${APISIX_IMAGE_TAG:-3.12.0-debian}
container_name: apisix
restart: always
volumes:
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
networks:
apisix:

etcd:
image: bitnami/etcd:3.5.11
restart: always
container_name: etcd
volumes:
- etcd_data:/bitnami/etcd
- ./etcd_backup:/backup
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:

dashboard:
image: apache/apisix-dashboard:3.0.0-centos
container_name: apisix-dashboard
volumes:
- ./apisix_dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
restart: always
networks:
apisix:

prometheus:
image: prom/prometheus:v2.25.0
restart: always
container_name: prometheus
volumes:
- ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
apisix:

loki:
image: grafana/loki:2.9.4
container_name: loki
restart: always
volumes:
- ./loki_conf:/etc/loki
command: -config.file=/etc/loki/loki-config.yaml
networks:
apisix:

promtail:
image: grafana/promtail:2.9.4
container_name: promtail
restart: always
volumes:
- /var/log/nginx:/var/log/nginx
- ./promtail_conf:/etc/promtail
command: -config.file=/etc/promtail/promtail-config.yaml
depends_on:
- loki
networks:
apisix:

grafana:
image: grafana/grafana:7.3.7
restart: always
volumes:
- "./grafana_conf/provisioning:/etc/grafana/provisioning"
- "./grafana_conf/dashboards:/var/lib/grafana/dashboards"
- "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
networks:
apisix:

nginx:
image: nginx:latest
container_name: nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx_conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl/cert.pem:/etc/nginx/cert.pem:ro
- ./ssl/key.pem:/etc/nginx/key.pem:ro
- /var/log/nginx:/var/log/nginx
depends_on:
- apisix
networks:
apisix:

networks:
apisix:
driver: bridge

volumes:
etcd_data:
driver: local
Loading