当前位置:网站首页>[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
边栏推荐
猜你喜欢

Blink SQL内置函数大全

一种朴素的消失点计算方法

实战回忆录:从Webshell开始突破边界

多伦多大学博士论文 | 深度学习中的训练效率和鲁棒性

UE4:Build Configuration和Config的解释

基于STM32F103ZET6库函数外部中断实验

数仓的字符截取三胞胎:substrb、substr、substring

Buzzer experiment based on stm32f103zet6 library function

《第五项修炼》(The Fifth Discipline):学习型组织的艺术与实践

Running lantern experiment based on stm32f103zet6 library function
随机推荐
Leetcode 1381. 设计一个支持增量操作的栈
Photoshop layer related concepts layercomp layers move rotate duplicate layer compound layer
Embracing cloud Nativity: Practice of Jiangsu Mobile order center
Crontab's learning essays
Error reported by Huada MCU Keil_ Weak's solution
Is it safe to buy stocks online and open an account?
数仓的字符截取三胞胎:substrb、substr、substring
NVIDIA Clara-AGX-Developer-Kit installation
基于STM32F103ZET6库函数跑马灯实验
高收益银行理财产品在哪里看?
Tupu digital twin intelligent energy integrated management and control platform
作为软件工程师,给年轻时的自己的建议(下)
(LC)46. 全排列
循环遍历及函数基础知识
可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹
通过 Cargo 管理 Rust 项目
Rust 所有权进阶 -- 内存管理
经纬度分析
Leetcode 989. 数组形式的整数加法(简单)
rust 中的结构体