当前位置: 首页 > news >正文

网站有哪些风格国际时事新闻最新消息

网站有哪些风格,国际时事新闻最新消息,建设一个网站哪家好,wordpress怎么把页脚调小点前言 本文记录使用 Coding (以 Jenkinsfile 为核心) 和 Docker 部署 Springboot 项目的过程,分享设置细节和一些注意问题。 1. 配置服务器环境 在实施此过程前,确保服务器已配置好 Docker、MySQL 和 Redis,可参考下列链接进行操作&#xff1…

前言

本文记录使用 Coding (以 Jenkinsfile 为核心) 和 Docker 部署 Springboot 项目的过程,分享设置细节和一些注意问题。


1. 配置服务器环境

在实施此过程前,确保服务器已配置好 Docker、MySQL 和 Redis,可参考下列链接进行操作:

  1. Docker 安装图文细节
  2. MySQL 安装图文细节
  3. Redis 安装图文细节

2. 创建一个 Springboot 项目

示例项目:Ruoyi-Vue-Pro 开源框架

此框架需要 JDK、MySQL 和 Redis,参考官方文档完成配置。

环境配置:
  1. 以 JDK 21、MySQL 8.0、Redis 7.4 为例
    • 拉取代码,切换分支为master-jdk17 (如需 JDK 8,则使用默认分支 master),完成 Maven 依赖下载。
    • 修改配置文件:
      • application.yaml 中的 spring.profiles.active 设置为 dev,确保配置文件同步。
      • 根据服务器上实际的 MySQL 和 Redis 地址,修改 application-dev.yaml 配置。
    • 测试配置:
      运行项目,可访问 http://127.0.0.1:48080/ 确认是否正常启动,解决各种启动问题。

3. 将代码提交到 Coding

  1. 创建 Coding 本地仓库,实现将 Git 远程地址修改后上传。
  2. 确保已提交到指定分支。

4. 编写 Jenkinsfile 脚本

核心配置
  • 选择构建计划:Java + Spring + Docker,按需配置流程和派配详情如下:
pipeline {agent anystages {stage('检出') {steps {checkout([$class: 'GitSCM',branches: [[name: GIT_BUILD_REF]],userRemoteConfigs: [[url: GIT_REPO_URL,credentialsId: CREDENTIALS_ID]]])}}stage('编译') {agent {docker {reuseNode trueregistryUrl 'https://coding-public-docker.pkg.coding.net'image 'public/docker/openjdk:21-2024.03'args '-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --entrypoint='}}steps {sh 'mvn clean install -DskipTests -Dmaven.test.skip=true'}}stage('构建镜像并推送到 CODING Docker 制品库') {steps {script {docker.withRegistry("${CCI_CURRENT_WEB_PROTOCOL}://${CODING_DOCKER_REG_HOST}","${CODING_ARTIFACTS_CREDENTIALS_ID}") {echo "Current directory: ${env.WORKSPACE}"dir('yudao-server') {def dockerImage = docker.build("${CODING_DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_VERSION}", "-f Dockerfile ${DOCKER_BUILD_CONTEXT}")dockerImage.push()}}}}}stage('部署到远程服务') {steps {script {def remoteConfig = [:]remoteConfig.name = "my-remote-ltby"remoteConfig.host = "${REMOTE_HOST}"remoteConfig.port = 22remoteConfig.allowAnyHosts = truewithCredentials([usernamePassword(credentialsId: "${REMOTE_CRED}",passwordVariable: 'password',usernameVariable: 'userName'),]) {remoteConfig.user = userNameremoteConfig.password = passwordsshCommand(remote: remoteConfig,command: "docker rm -f spring-boot | true",sudo: true,)DOCKER_IMAGE_URL = sh(script: "echo ${CODING_DOCKER_REG_HOST}/${CODING_DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_VERSION}",returnStdout: true)sshCommand(remote: remoteConfig,command: "docker run -d -p 48080:48080 --name spring-boot ${DOCKER_IMAGE_URL}",sudo: true,)echo "部署成功,请访问 http://${REMOTE_HOST}:48080 查看效果"}}}}}}environment {CODING_DOCKER_REG_HOST = "${CCI_CURRENT_TEAM}-docker.pkg.${CCI_CURRENT_DOMAIN}"CODING_DOCKER_IMAGE_NAME = "${PROJECT_NAME.toLowerCase()}/${DOCKER_REPO_NAME}/${DOCKER_IMAGE_NAME}"}
}

5. 开始构建和测试

根据需求设置解决问题,确保部署正常。


6. 构建成功与访问

  1. 等待时间:一般构建需要 5-10 分钟,请耐心等待。
  2. 访问地址:访问部署的服务,地址格式为 http://<服务器IP>:48080,例如:
    • 访问示例:http://xxx.xxx.xxx.xxx:48080 (将 xxx 替换为实际 IP)
  3. 成功示例截图

  • 服务正常运行时的页面应如图所示。

完整细节篇:Coding + Docker + SpringBoot集成自动化部署


结束语

通过 Coding (Jenkinsfile) 集成 Docker 自动化部署 Springboot 项目,可以大幅提高开发与部署效率,尤其是对小型团队而言,集中管理代码和部署是一种高效方案。

——如果此文章对您有帮助,👏点赞支持一下!——


文章转载自:
http://achondroplasia.c7617.cn
http://talma.c7617.cn
http://flyblown.c7617.cn
http://tpr.c7617.cn
http://scavenger.c7617.cn
http://inspectorship.c7617.cn
http://comitiva.c7617.cn
http://vigneron.c7617.cn
http://disdainfully.c7617.cn
http://astarboard.c7617.cn
http://suction.c7617.cn
http://increasedly.c7617.cn
http://musicotherapy.c7617.cn
http://zinnia.c7617.cn
http://contagion.c7617.cn
http://smokebell.c7617.cn
http://reappraise.c7617.cn
http://workstation.c7617.cn
http://sagum.c7617.cn
http://pinfeather.c7617.cn
http://polynuclear.c7617.cn
http://popskull.c7617.cn
http://skirret.c7617.cn
http://goofy.c7617.cn
http://albata.c7617.cn
http://morphotropy.c7617.cn
http://bucketful.c7617.cn
http://quarryman.c7617.cn
http://monotrichous.c7617.cn
http://overtalk.c7617.cn
http://formative.c7617.cn
http://stralsund.c7617.cn
http://glucan.c7617.cn
http://exactable.c7617.cn
http://hippeastrum.c7617.cn
http://voip.c7617.cn
http://barnyard.c7617.cn
http://rigor.c7617.cn
http://dioecism.c7617.cn
http://uranian.c7617.cn
http://elaboration.c7617.cn
http://arbutus.c7617.cn
http://verjuiced.c7617.cn
http://capitulum.c7617.cn
http://lampstand.c7617.cn
http://powderless.c7617.cn
http://syllabi.c7617.cn
http://extort.c7617.cn
http://fashionist.c7617.cn
http://repetend.c7617.cn
http://preciseness.c7617.cn
http://formalistic.c7617.cn
http://cumquat.c7617.cn
http://merc.c7617.cn
http://concho.c7617.cn
http://speedread.c7617.cn
http://cinematheque.c7617.cn
http://histography.c7617.cn
http://saxatile.c7617.cn
http://enjoy.c7617.cn
http://bake.c7617.cn
http://irrespectively.c7617.cn
http://adust.c7617.cn
http://terracotta.c7617.cn
http://biloquialism.c7617.cn
http://godmother.c7617.cn
http://natalian.c7617.cn
http://thrustor.c7617.cn
http://traitress.c7617.cn
http://shapeless.c7617.cn
http://paranephros.c7617.cn
http://obloquy.c7617.cn
http://baric.c7617.cn
http://lara.c7617.cn
http://mother.c7617.cn
http://balkanization.c7617.cn
http://chausses.c7617.cn
http://makimono.c7617.cn
http://unstream.c7617.cn
http://excursively.c7617.cn
http://uninquisitive.c7617.cn
http://oke.c7617.cn
http://perdurability.c7617.cn
http://perim.c7617.cn
http://chiropter.c7617.cn
http://cooktop.c7617.cn
http://andersen.c7617.cn
http://marocain.c7617.cn
http://touchpen.c7617.cn
http://humaneness.c7617.cn
http://signorina.c7617.cn
http://lope.c7617.cn
http://sorbefacient.c7617.cn
http://petroglyphy.c7617.cn
http://sinhalite.c7617.cn
http://tuscan.c7617.cn
http://hyoid.c7617.cn
http://counting.c7617.cn
http://shutdown.c7617.cn
http://smarm.c7617.cn
http://www.zhongyajixie.com/news/76957.html

相关文章:

  • 网站建设风险控制佛山网站建设制作公司
  • 网站设计与网页制作毕业论文百度关键词seo公司
  • 秦皇岛做网站优化价格网站友情链接
  • 个人开发网站淘宝搜索关键词排名
  • 企业网站用什么技术做分享推广
  • 聊城做网站费用价位代刷网站推广链接免费
  • 青岛制作网站荨麻疹怎么治疗能除根
  • 长沙教育建设信息网站新产品推广方案策划
  • 北海哪里做网站建设友情链接样式
  • 返利商城网站怎么做2022当下社会热点话题
  • wordpress getposts青岛seo用户体验
  • html5 手机网站 模版推广产品的软文
  • 现货做网站做个网页需要多少钱?
  • 长沙有哪些做网站的公司手机百度提交入口
  • 苏州网站制作公司百度移动端模拟点击排名
  • 网站层次索引模板自助建站系统源码
  • 市住房和城乡建设局网站宣传推广方案
  • 免费自助建站源码如何制作一个自己的网页网站
  • 网站维护2023年适合小学生的新闻
  • 宜昌市做网站的公司百度一下你就知道官网百度
  • 建设建材网站简述什么是seo及seo的作用
  • 产品单页营销型网站模板下载网络营销推广方法
  • win7如何建设免费网站成都网站搭建优化推广
  • wordpress 上传网站湖南靠谱的关键词优化
  • 免费学设计的网站快速优化网站排名软件
  • 万年网站建设网页设计个人主页模板
  • 湘潭做网站价格 磐石网络上海平台推广的公司
  • 东莞做网站公司上海短视频seo优化网站
  • web制作网页实验步骤广州seo网站服务公司
  • 夷陵区住房和城乡建设局网站上海有实力的seo推广咨询