Skip to content

Docker 部署

私有镜像

安装指南

APIX 使用 etcd 作为配置中心进行保存和同步配置。在安装 APIX 之前,需要在你的主机上安装 etcd。 如果你在安装 APIX 时选择了 Docker 安装,可以参考以下 docker-compose.yaml

shell
version: "3"
  
services:
  gateman:
    image: reepu.cn/apix/gateman:3.0.1-alpine
    container_name: gateman
    restart: always
    volumes:
      - ./gateman/logs:/usr/local/gateman/logs
      - ./gateman/conf/conf.yaml:/usr/local/gateman/conf/conf.yaml:ro
    ports:
      - 9000:9000/tcp
    depends_on:
      - etcd
    network_mode: bridge

  gateway:
    image: reepu.cn/apix/gateway:3.3.0-debian
    container_name: gateway
    restart: always
    volumes:
      - ./gateway/logs:/usr/local/apix/logs
      - ./gateway/conf/config.yaml:/usr/local/apix/conf/config.yaml:ro
    ports:
      - 9080:9080/tcp
      - 9443:9443/tcp
    depends_on:
      - etcd
    network_mode: bridge

  etcd:
    image: bitnami/etcd:latest
    container_name: etcd
    restart: always
    environment:
      TZ: Asia/Shanghai
      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"
    ports:
      - 2379:2379/tcp
      - 2380:2380/tcp
    network_mode: bridge