https://github.com/cuigh/yapi
Docker image for YApi
https://github.com/cuigh/yapi
docker yapi
Last synced: 2 months ago
JSON representation
Docker image for YApi
- Host: GitHub
- URL: https://github.com/cuigh/yapi
- Owner: cuigh
- Created: 2018-06-11T09:52:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T10:42:49.000Z (over 7 years ago)
- Last Synced: 2025-01-23T10:25:51.200Z (about 1 year ago)
- Topics: docker, yapi
- Language: Dockerfile
- Size: 1.95 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker image for [YApi](https://github.com/YMFE/yapi)
## Config
Config file must be mounted at `/app/config.json` in container. Here is an example config file.
```json
{
"port": "3000",
"adminAccount": "admin@admin.com",
"db": {
"servername": "127.0.0.1",
"DATABASE": "yapi",
"port": 27017,
"user": "test1",
"pass": "test1",
"authSource": ""
},
"mail": {
"enable": true,
"host": "smtp.163.com",
"port": 465,
"from": "***@163.com",
"auth": {
"user": "***@163.com",
"pass": "*****"
}
}
}
```
## Initialize
You must initialize the **YApi** before you run it for the first time.
```bash
docker run -ti --rm -v $PWD/yapi.json:/app/config.json cuigh/yapi:v1.3.17 /app/yapi/server/install.js
```
## Run
```bash
docker run -ti --rm -v $PWD/yapi.json:/app/config.json -p 3000:3000 cuigh/yapi:v1.3.17
```