This article is a mirror article of machine translation, please click here to jump to the original article.

View: 41223|Reply: 25

Tutorial on deploying rap2 with docker under Centos 7

[Copy link]
Posted on 10/10/2018 11:50:29 AM | | | |
RAP

RAP is a visual interface management tool that analyzes the interface structure, dynamically generates simulation data, verifies the correctness of real interfaces, and improves our collaboration efficiency through a series of automation tools around interface definitions. Our slogan: Be efficient, go home for dinner!

RAP2 is a new project that builds on RAP1, which contains two components (corresponding to two Github Repositories).

Easily edit and share

Visual editing, perfect version control, import and export of various formats. It makes the work of front-end and back-end convention interfaces very simple

Mock service

RAP automatically generates mock interfaces based on interface documents, which automatically generate simulation data and support complex generation logic.

Guarantee of strength

Covering almost all departments of Alibaba, 200+ companies are using RAP, and after 4 years of accumulating a lot of experience, it can adapt to various complex business scenarios.

This topic deploys rap2 to provide interface management services for teams to improve the efficiency of development teams. There are many problems encountered during the deployment process, so I will make a summary here, one is to summarize my gains in the deployment process, and the other is to provide a little reference for peers who need to deploy rap2.

Deploy the environment

CentOS 7 x64-bit
docker version: 1.13.1

Centos7 Docker installation and configuration in practice
http://www.itsvse.com/thread-5014-1-1.html
(Source: Architect_Programmer)

understand

To deploy the rap2 system, you actually need to deploy two projects

rap2-dolores: The rap2 frontendGitHub address:https://github.com/thx/rap2-dolores
rap2-delos: The rap2 backendGitHub address:https://github.com/thx/rap2-delos

Deploy rap2-delos (backend)

rap2-delos: 后端数据API服务器,基于Koa + MySQL

Environment requirements:Node.js 8.9.4+, MySQL 5.7+, Redis 4.0+

Here, we use docker to deploy rap2-delos, which requires basic docker knowledge, omitted.

Docker Image image

The Docker image comes from Delos, that isThe image only contains the backend, not the frontend。 I packaged and uploaded the Dockerfile for some of the commits that I thought were more critical.

Image address:https://hub.docker.com/r/blackdog1987/rap2-delos/

Pull the latest docker image (as of the time of publication, the latest version is 2.6.0dcb5de)

Tag number
The last paragraph of the tag is the code of commit. You can find the version corresponding to the image through the author's commit record. For example, 2.6.b90e5a1 is a mirror image of commit b90e5a1a63ee45d7165ec8cb2ca81212c20cd701.
You can use docker images to view the native image



Modify the configuration in the docker-compose.xml. By default, I use the image of mysql and redis. You can modify it to your own configuration

Here, we use a third-party docker-compose.xml configuration, link:https://github.com/blackdog1987/ ... /docker-compose.yml

docker-compose.xml is not directly usable, it needs to be adjusted, and the file I modified is as follows:

Tourists, if you want to see the hidden content of this post, pleaseReply


centos installation Docker Compose tutorial
http://www.itsvse.com/thread-5164-1-1.html
(Source: Architect_Programmer)

I upload the file to the /root directory and execute the following command:



The execution is as follows:



Look at the container running: docker ps



Since I docker-compose.xml the configured file, it is to map the 8080 port of the rap2-delos container directly to the 80 port of the host machine, as shown in the figure above, I can directly access the external IP address, as shown in the figure below:



Since I mapped port 3306 of the mysql container to port 33306 of the host machine, I can directly access the MySQL database through port 33306 of the external network, and the username root password is empty, as shown in the figure below:



Here, please do a good job in database security, cancel the docker mysql container 3306 port mapping or make a policy on the firewall!

Here, the rap2-delos backend is deployed!!

Deploy rap2-dolores (frontend)



Configure the address of the backend server

Modify the /src/config/config.dev.js and /src/config/config.prod.js (production mode configuration file) files



Run



Sign up for an account and log in! How to package and deploy the frontend to the server will not be written here.

(End)





Previous:Parameterized query @macid nvarchar(50' requires parameter '@macid', but does not provide that...
Next:Discuz prohibits the registration of Taiwanese IP addresses
Posted on 12/6/2018 11:23:11 AM |
ML is not directly usable, it needs to be adjusted, and the file I modified is as follows:
Posted on 4/9/2019 7:32:57 PM |
I want to see what you change docker-compose.xml to.
Posted on 1/31/2019 8:52:26 AM |
Study, learn, learn, learn, learn, learn
Posted on 10/11/2018 3:00:50 PM |
Thank you for your support
Posted on 12/6/2018 10:54:57 AM |
11111111111111111111111111
Posted on 12/11/2018 3:12:24 PM |
Support it
Posted on 12/12/2018 4:36:24 PM |
nihao ,xiexieni
Posted on 12/25/2018 10:59:03 AM |
Learn it
Posted on 12/25/2018 11:29:43 AM |
Hehehehe
Posted on 1/9/2019 11:38:01 AM |
Recently used this rap2 to learn it
Posted on 1/23/2019 1:19:43 PM |
Learn it
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com