add apisix
This commit is contained in:
73
API/apisix/docker-compose.yml
Normal file
73
API/apisix/docker-compose.yml
Normal file
@ -0,0 +1,73 @@
|
||||
networks:
|
||||
docker-traefik_front_network:
|
||||
external: true
|
||||
back_network:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
|
||||
services:
|
||||
apisix:
|
||||
image: apache/apisix:latest
|
||||
container_name: apisix-server
|
||||
restart: always
|
||||
volumes:
|
||||
- ./apisix_volume/apisix/apisix_log:/usr/local/apisix/logs
|
||||
- ./apisix_volume/apisix/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
|
||||
depends_on:
|
||||
- apisix-etcd
|
||||
ports:
|
||||
- 7080:9080
|
||||
- 7180:9180
|
||||
- 7091:9091
|
||||
- 7092:9092
|
||||
- 7443:9443
|
||||
networks:
|
||||
- back_network
|
||||
|
||||
apisix-dashboard:
|
||||
image: apache/apisix-dashboard:latest
|
||||
container_name: apisix-dashboard
|
||||
restart: always
|
||||
volumes:
|
||||
- ./apisix_volume/apisix/dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
|
||||
depends_on:
|
||||
- apisix-etcd
|
||||
ports:
|
||||
- 7000:9000
|
||||
networks:
|
||||
- back_network
|
||||
- docker-traefik_front_network
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=docker-traefik_front_network"
|
||||
# HTTP
|
||||
- "traefik.http.routers.apisix-http.rule=Host(`apisix-dashboard.fr.dgs.group`)"
|
||||
|
||||
- "traefik.http.routers.apisix-http.entrypoints=http"
|
||||
# HTTPS
|
||||
- "traefik.http.routers.apisix-https.rule=Host(`apisix-dashboard.fr.dgs.group`)"
|
||||
- "traefik.http.routers.apisix-https.entrypoints=https"
|
||||
- "traefik.http.routers.apisix-https.tls=true"
|
||||
- "traefik.http.routers.apisix.service=apisix-service"
|
||||
# Middleware
|
||||
# Service
|
||||
- "traefik.http.services.apisix-service.loadbalancer.server.port=7000"
|
||||
|
||||
apisix-etcd:
|
||||
image: bitnami/etcd:latest
|
||||
container_name: apisix-etcd
|
||||
ports:
|
||||
- 2380:2380
|
||||
- 2379:2379
|
||||
environment:
|
||||
- ALLOW_NONE_AUTHENTICATION=yes
|
||||
- ETCD_NAME=etcd-1
|
||||
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
|
||||
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
|
||||
- ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
|
||||
volumes:
|
||||
- ./apisix_volume/etcd:/etcd
|
||||
# - ./apisix_volume/etcd/conf:/opt/bitnami/etcd/conf
|
||||
networks:
|
||||
- back_network
|
||||
|
Reference in New Issue
Block a user