git clone https://github.com/Ryan-Miao/docker-yapi.git
cd docker-yapi
docker-compose up
startup error
view log
docker logs 0bb91e61beef
1. Path: vim root/dokcer-yapi/docker-compose.yml
2. Remove the # command: "yapi server",
3. Add # in front of the command command: "node /my-yapi/vendors/server/app.js"
3. Execute again: docker-compose up
When this happens, it means success.
docker ps -a
There are two running containers, yapi and mongo, and there are also ports
Visit http://10.1.1.246:9090/ If the local deployment address is 0.0.0.0:9090
After the deployment is complete, modify the configuration file
1. Path: vim root/dokcer-yapi/docker-compose.yml
2. Add # command: "yapi server",
3. Remove the # command: "node /my-yapi/vendors/server/app.js"
3. Execute again: docker-compose up
Then docker ps -a found that the service port has changed to 3000
If you visit http://10.1.1.246:3000/ for local deployment, the address is 0.0.0.0:3000
You're done Deployment is successful!