当前位置:网站首页>[debug] platform engineering interface debugging
[debug] platform engineering interface debugging
2022-06-27 19:56:00 【The Nuggets said】
After we split the front and rear ends , The development environment is deployed on the server , We want to develop interfaces that can verify the effect , You need to submit the code build before you can view ( Long waiting time ), Use postman Simple debugging results are not intuitive and problems do not appear .
Expectation expectation
View results in real time , Adjust your code in real time , Real time linkage debugging
resolvent
1. Interface debugging
2. Remote debugging
Container build deployment
- Original port (-p 18080:8080) Is the front web Use
docker run --restart=always -d -p 18080:8080 -e SPRING_PROFILES_ACTIVE=dev -v /data/sys-api/config:/app/config --name sys-api 【PORT】:【PORT】/docker/sys-api:latest
- Supplementary port (-p 18082:8081 ) Is remote debug Use
docker run --restart=always -d -p 18082:8081 -p 18080:8080 -e SPRING_PROFILES_ACTIVE=dev -v /data/sys-api/config:/app/config --name sys-api 【PORT】:【PORT】/docker/sys-api:latest
advantage : Keep the project code synchronized , You can debug and troubleshoot online problems remotely
Insufficient : Cannot adjust processing in real time
3. Local deployment
Put the latest in the front container web Copy files to local nginx Just above , Under the custom path
- create a file
mkdir -p /opt/pro_web_sys
cd /opt/pro_web_sys
touch 1startCopyWeb_sys.sh
- 1startCopyWeb_sys Content
#/bash/sh
docker cp sys-web:/usr/local/web .
mv ops-dc_* temp_sys/
sleep 1
#my_time = date +"%Y%m%d"
ls_date=`date +%Y%m%d%H%M%S`
mv web/ ops-sys
zip -r ops-sys_${ls_date}.zip ops-sys/
mv ops-sys/ ops-sys_${ls_date}
- To configure nginx
server {
# 【*】 Deployment port - Be careful not to conflict with other ports
listen 19041;
server_name localhost;
client_max_body_size 1024m;
# The files you copied
root D:/develop/nginx/project/ops-sys;
# 【*】 Interface forward - The Convention is to add... Before the deployment port number ‘1’
location ~ /(api|usr)/ {
proxy_pass http://localhost:8082;
}
location / {
rewrite ^/admin /pages/admin.html;
rewrite ^[^\.]+$ /pages/index.html;
try_files $uri $uri/ /index.html;
}
}
See attached nginx To configure
边栏推荐
猜你喜欢
C# 二维码生成、识别,去除白边、任意颜色
Bit. Store: long bear market, stable stacking products may become the main theme
MySQL beginner benefits
Adding, deleting, modifying and querying MySQL tables (basic)
Oracle 获取月初、月末时间,获取上一月月初、月末时间
蓄力中台,用友iuap筑牢社会级企业数智化新底座
[login interface]
过关斩将,擒“指针”(下)
Blink SQL built in functions
Blink SQL内置函数大全
随机推荐
判断一个变量是数组还是对象?
Longitude and latitude analysis
crontab的学习随笔
Rust 中的枚举和控制流运算
MySQL初学者福利
Code and principle of RANSAC
Blink SQL内置函数大全
(LC)46. 全排列
Tupu digital twin intelligent energy integrated management and control platform
Leetcode 1381. 设计一个支持增量操作的栈
One to one relationship
Summary of submarine cable detection technology
UE4:Build Configuration和Config的解释
One week technical update express of substrate and Boca 20220425 - 20220501
指针和结构体
Solution of adding st-link to Huada MCU Keil
openssl客户端编程:一个不起眼的函数导致的SSL会话失败问题
mime.type文件内容
【云驻共创】 什么是信息化?什么是数字化?这两者有什么联系和区别?
1023 Have Fun with Numbers