Coder Social home page Coder Social logo

jzxyouok / docker-yapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fjc0k/docker-yapi

0.0 1.0 0.0 27 KB

接口管理平台 YApi 的 Docker 镜像。

Home Page: https://hub.docker.com/r/jayfong/yapi

License: MIT License

Dockerfile 20.74% Shell 5.16% JavaScript 74.10%

docker-yapi's Introduction

docker-YApi

Docker 中运行 YApi

要求

你得确保在你的设备上安装了不是太老版本的 DockerDocker Compose

安装

首先,克隆本项目:

git clone https://github.com/fjc0k/docker-YApi.git

接下来,修改 config.js 配置文件中的 adminAccount 为你的邮箱,其他选项可不做修改。

最后,执行 docker-compose up -d 启动服务。

然后,通过 http://localhost:40001 即可访问 YApi

注意:默认的管理员账号是你在 config.js 中设置的 adminAccount,密码是 ymfe.org

使用插件

👉 点击查看 YApi 插件列表

假设你要使用这个插件:yapi-plugin-interface-oauth2-token,编辑 config.js,将该插件名称(去除 yapi-plugin- 前缀)加入 plugins 即可:

{
  plugins: [
    { name: 'interface-oauth2-token' }
  ]
}

若插件可配置,则可同时传入选项:

{
  plugins: [
    { name: 'interface-oauth2-token' },
    {
      name: 'gitlab',
      options: {
        host: '***',
        // ...其他选项
      }
    }
  ]
}

如何重启

若你修改了配置文件 config.js,务必重启应用才能生效:

docker-compose restart yapi-web

如何升级

YApi 有更新,本项目应会尽快跟进,之后,你可使用以下命令升级:

docker-compose pull yapi-web \
  && docker-compose down \
  && docker-compose up -d

升级不会对原有数据造成任何影响!

查看日志

如果出现意外情况,你可通过以下命令查看运行日志:

docker-compose logs yapi-web

如何迁移

直接打包整个目录去新的服务器即可。

许可

Jay Fong © MIT

docker-yapi's People

Contributors

fjc0k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.