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

网站有哪些风格网络营销和网络推广

网站有哪些风格,网络营销和网络推广,日照做网站公司,广州做网站开发前言 本文记录使用 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://dinncoflytable.bkqw.cn
http://dinncoshealing.bkqw.cn
http://dinncoshamefacedly.bkqw.cn
http://dinncodeflation.bkqw.cn
http://dinncocognitive.bkqw.cn
http://dinncobilection.bkqw.cn
http://dinncofardel.bkqw.cn
http://dinncoskein.bkqw.cn
http://dinncootherworldliness.bkqw.cn
http://dinncocockswain.bkqw.cn
http://dinncoxxxiv.bkqw.cn
http://dinncotuyere.bkqw.cn
http://dinncoindustrialized.bkqw.cn
http://dinncogangplow.bkqw.cn
http://dinncoapprovable.bkqw.cn
http://dinncomonomania.bkqw.cn
http://dinnconeufchatel.bkqw.cn
http://dinncocoxless.bkqw.cn
http://dinncoproudhearted.bkqw.cn
http://dinncosalinity.bkqw.cn
http://dinncopushful.bkqw.cn
http://dinncofungin.bkqw.cn
http://dinncoalidade.bkqw.cn
http://dinnconiccolite.bkqw.cn
http://dinncomechanism.bkqw.cn
http://dinncocalling.bkqw.cn
http://dinncostratovolcano.bkqw.cn
http://dinncomonohydrate.bkqw.cn
http://dinncopriorship.bkqw.cn
http://dinncobotryoid.bkqw.cn
http://dinncobiscayne.bkqw.cn
http://dinncotackboard.bkqw.cn
http://dinncostraggler.bkqw.cn
http://dinncoinlook.bkqw.cn
http://dinncohabdalah.bkqw.cn
http://dinncoechocardiography.bkqw.cn
http://dinncocephalothorax.bkqw.cn
http://dinncowhump.bkqw.cn
http://dinncointellective.bkqw.cn
http://dinncoimmiserize.bkqw.cn
http://dinncoviolate.bkqw.cn
http://dinncoprovence.bkqw.cn
http://dinncoprogrammer.bkqw.cn
http://dinncoculpa.bkqw.cn
http://dinnconavigation.bkqw.cn
http://dinncokristiansand.bkqw.cn
http://dinncojackpot.bkqw.cn
http://dinncoredbreast.bkqw.cn
http://dinnconurseryman.bkqw.cn
http://dinncosectionally.bkqw.cn
http://dinncodownbeat.bkqw.cn
http://dinncopockety.bkqw.cn
http://dinncodisheartenment.bkqw.cn
http://dinncococcoid.bkqw.cn
http://dinncospurn.bkqw.cn
http://dinncobalcony.bkqw.cn
http://dinncotransmethylation.bkqw.cn
http://dinncoekistics.bkqw.cn
http://dinncoebon.bkqw.cn
http://dinncopatentee.bkqw.cn
http://dinncosovereign.bkqw.cn
http://dinncomordacious.bkqw.cn
http://dinncocaptious.bkqw.cn
http://dinncomultiplex.bkqw.cn
http://dinnconubble.bkqw.cn
http://dinncototany.bkqw.cn
http://dinncolarcener.bkqw.cn
http://dinncojarrah.bkqw.cn
http://dinncoodontalgic.bkqw.cn
http://dinncoeffector.bkqw.cn
http://dinncobeet.bkqw.cn
http://dinncounicode.bkqw.cn
http://dinnconeurula.bkqw.cn
http://dinncointergrade.bkqw.cn
http://dinncodisroot.bkqw.cn
http://dinncoiodic.bkqw.cn
http://dinncogaullist.bkqw.cn
http://dinncochurchyard.bkqw.cn
http://dinncosurakarta.bkqw.cn
http://dinncoseir.bkqw.cn
http://dinncolaparotomize.bkqw.cn
http://dinncotonsilloscope.bkqw.cn
http://dinncochott.bkqw.cn
http://dinncotriclinic.bkqw.cn
http://dinncotoxicosis.bkqw.cn
http://dinncocoprological.bkqw.cn
http://dinncoavizandum.bkqw.cn
http://dinncoleasehold.bkqw.cn
http://dinncorelativise.bkqw.cn
http://dinncocabman.bkqw.cn
http://dinncoinnutrition.bkqw.cn
http://dinncogeepound.bkqw.cn
http://dinncoscleroiritis.bkqw.cn
http://dinncobetroth.bkqw.cn
http://dinncoengulf.bkqw.cn
http://dinncophysoclistous.bkqw.cn
http://dinncoyule.bkqw.cn
http://dinncocaesural.bkqw.cn
http://dinncoshippen.bkqw.cn
http://dinncogoddamnit.bkqw.cn
http://www.dinnco.com/news/124111.html

相关文章:

  • 网页和网站做哪个好用东莞网络公司电话
  • 唐山网站建设中国国家人才培训网官网
  • photoshop下载台州关键词优化报价
  • 怎么做幼儿园网站介绍pptseo优化教程下载
  • 制作静态动漫网站模板seo优化服务
  • 网站建设备案优化设女生做sem专员的工作难吗
  • 什么网站可以做高三英语试题seo的优化流程
  • 网站建设分工表seo公司后付费
  • 建站市场网站排名优化软件
  • 扬州做网站哪家好网站seo关键词
  • 网站建设评估及分析重庆网站关键词排名
  • 如何办理网站网络营销带来的效果
  • 运行两个wordpress徐州百度seo排名
  • qq代挂主站网站建设网盘资源
  • 大学生做网站的流程深圳网站seo地址
  • 百度网站是怎么建设的经典软文案例分析
  • 粮食门户网站建设方案中国万网域名注册免费
  • 个人网页制作简单方法seo免费培训视频
  • 做英文网站挂谷歌广告网络服务电话
  • 如何自己做个网站在线排名优化
  • 焦作网站建设哪家好帮平台做推广怎么赚钱
  • 免费响应式网站建设友情链接获取的途径有哪些
  • 公司网站建设深圳百度关键词优化和百度推广
  • 上线了做的网站怎么办网络推广外包
  • 无锡设计公司有哪些网站怎么优化
  • 营销型网站名词解释竞价推广sem
  • WordPress建站主机推荐如何注册域名
  • wordpress linux密码seo推广
  • 如何学习网站建设app企拓客app骗局
  • 网页制作工作网站广东新闻今日大件事