Sign inSign up

baicailin/open_api_client

By baicailin

Updated 12 months ago

白菜林 openAPI

Image
1

5.7K

baicailin/open_api_client repository overview

使用步骤:

1、新建文件夹 (假设为app )

2、下载配置模版到app/conf/config.yaml 修改配置模版中的配置项为自己的。

下载地址:https://gitee.com/lyhuilin/openAPI/blob/master/conf/api_client/config.simple.yaml

3、在app/docker-compose.yml中写入以下内容:

version: "3.3"
services:
  # db:
  #   image:  postgres
  #   volumes:
  #     - ./tmp/db:/var/lib/postgresql/data
  #   environment:
  #     POSTGRES_PASSWORD: xxx
  #     POSTGRES_USER: xxx
  #     POSTGRES_DB: xxx
  api_client:
    image:  baicailin/open_api_client
    # build: ./..
    command: /app/api_client_linux -c=/app/conf/config.yaml
    volumes:
      - ./conf:/app/conf
      - ./autocert:/app/autocert
      - ./log:/app/log
      - ./upload:/app/upload
      # - /tmp:/app/upload
    # environment:
    #   TZ: Asia/Shanghai
    ports:
      - "8080:8080"
    # depends_on:
    #   - db

如果要用postgres数据库,可以去掉上面的注释符号 (#)

4、在app目录下运行命令

docker-compose up -d

5、使用docker run 指令运行(替代上面步骤3-4)

docker run -d -p 8080:8080 --mount type=bind,source=app目录的绝对路径,target=/app/conf,readonly baicailin/open_api_client

6、注意事项 如果需要网页服务,需要修改配置中的openAPIClient地址为可访问地址(非127.0.0.1)

交流群

@baicai_dev

赞赏

赞赏白菜林,多少不重要,1元也是支持

赞赏白菜林,多少不重要,1元也是支持

Tag summary

Content type

Image

Digest

sha256:5418d299f

Size

23.2 MB

Last updated

12 months ago

docker pull baicailin/open_api_client