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

如何做网课网站新闻头条最新消息今日头条

如何做网课网站,新闻头条最新消息今日头条,中国摄影师个人网站设计,网站建设教程下载比如这里把文件放到/xin/docker/jiaoZ/的目录下,jar包和下面的配置文件都放在这个文件夹下。 注意要把jar端口改为你实际启动的,映射端口也可以改为你想要的。 这里的映射端口为:nginx监听80端口,jar在8620端口,mysq…

比如这里把文件放到/xin/docker/jiaoZ/的目录下,jar包和下面的配置文件都放在这个文件夹下。

注意要把jar端口改为你实际启动的,映射端口也可以改为你想要的。

这里的映射端口为:nginx监听80端口,jar在8620端口,mysql在3306端口,redis在6379端口。

Dockerfile

如果这里不安装字体,若依登录时的验证码会显示不出来!

# 使用适合Oracle JDK 8的基础镜像
FROM openjdk:8-jdk# 安装字体
RUN apt-get update && apt-get install -y \fontconfig \fonts-dejavu \xfonts-100dpi \&& rm -rf /var/lib/apt/lists/*# 确保/app目录存在
RUN mkdir -p /app# 添加jar包到容器
ADD wms-productV3.0.jar /app/wms-productV3.0.jar# 设置工作目录
WORKDIR /app# 设置环境变量,如有需要
# ENV ...# 开放8620端口
EXPOSE 8620# 运行jar包
CMD ["java", "-jar", "wms-productV3.0.jar"]

docker-compose.yml

version: '3.8'  # 指定 Docker Compose 文件版本services:  # 定义应用程序由哪些服务组成mysql:  # MySQL 数据库服务image: mysql:8  # MySQL 服务使用的 Docker 镜像environment:  # 传递给容器的环境变量MYSQL_ROOT_PASSWORD: root  # 设置 MySQL 的 root 密码MYSQL_DATABASE: jung_wms  # 创建名为 jung_wms 的数据库command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password  # MySQL 服务器配置volumes:  # 将主机路径或命名卷挂载到容器中- ./mysql:/var/lib/mysql  # 将 MySQL 数据持久化到主机目录- ./mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql:ro  # 使用 SQL 脚本初始化数据库- ./my.cnf:/etc/mysql/conf.d/custom.cnf:ro  # 自定义 MySQL 配置文件ports:- "3306:3306"  # 在主机上公开 MySQL 的 3306 端口redis:  # Redis 服务image: redis  # Redis 服务使用的 Docker 镜像volumes:- ./redis:/data  # 将 Redis 数据持久化到主机目录ports:- "6379:6379"  # 在主机上公开 Redis 的 6379 端口nginx:  # Nginx 网络服务器服务image: nginx  # Nginx 服务使用的 Docker 镜像volumes:- ./nginx:/etc/nginx/conf.d  # 将主机的 nginx 配置目录映射到容器中- ./app.conf:/etc/nginx/conf.d/app.conf:ro  # 特定的 Nginx 应用配置文件- /xin/docker/jiaoZ/dist:/usr/share/nginx/html  # 将主机的前端文件映射到 Nginx 容器中ports:- "80:80"  # 在主机上公开 Nginx 的 80 端口app:  # 应用服务build:  # 构建 Docker 镜像的配置context: .  # Docker 构建上下文目录dockerfile: Dockerfile  # Dockerfile 文件名volumes:- ./app:/app  # 应用源代码卷- ./wms-productV3.0.jar:/app/wms-productV3.0.jar:ro  # 特定的应用 JAR 文件ports:- "8620:8620"  # 在主机上公开应用的 8620 端口depends_on:  # 指定服务之间的依赖关系- mysql- redis

app.conf 

server {listen 80;location / {root /usr/share/nginx/html;index index.html index.htm;try_files $uri $uri/ /index.html;}location /ars/ { # 确保这里有结束的斜杠proxy_pass http://app:8620/; # 这会将匹配到的/ars/替换为这里的斜杠/proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;}
}

my.cnf

关闭lmysql区分表名大小写。

[mysqld]
lower_case_table_names=1

mysql-init.sql

初始化的sql,比如这里创建jung_wms数据库

CREATE DATABASE IF NOT EXISTS jung_wms;

启动程序 

docker-compose up --build

发现启动后,因为app.jar启动的慢,nginx启动的快,所以nginx访问app时就访问不到,异常退出了,所以等jar包启动之后,手动启动一下nginx就可以了,下面是命令。

新开一个窗口运行下面命令,名称改为你nginx的。

docker restart jiaoz-nginx-1

完。 


文章转载自:
http://dinncosandiver.ssfq.cn
http://dinncowaggonage.ssfq.cn
http://dinncosigniory.ssfq.cn
http://dinncoprolative.ssfq.cn
http://dinncopluviometry.ssfq.cn
http://dinncoabstinent.ssfq.cn
http://dinncoteammate.ssfq.cn
http://dinncogolosh.ssfq.cn
http://dinncomanchette.ssfq.cn
http://dinncosparingly.ssfq.cn
http://dinncoproductively.ssfq.cn
http://dinncothreatening.ssfq.cn
http://dinncoandrogenous.ssfq.cn
http://dinncoscaredy.ssfq.cn
http://dinncomanoeuver.ssfq.cn
http://dinncotemperature.ssfq.cn
http://dinncofloodplain.ssfq.cn
http://dinncoendleaf.ssfq.cn
http://dinncorheometer.ssfq.cn
http://dinncoanatomical.ssfq.cn
http://dinncofurphy.ssfq.cn
http://dinncolaziness.ssfq.cn
http://dinncomicroassembler.ssfq.cn
http://dinncopiracy.ssfq.cn
http://dinncochimaera.ssfq.cn
http://dinncoaeroballistics.ssfq.cn
http://dinncounsaid.ssfq.cn
http://dinncocolonitis.ssfq.cn
http://dinncosniffle.ssfq.cn
http://dinncotrichloroethylene.ssfq.cn
http://dinncononsked.ssfq.cn
http://dinncofalsify.ssfq.cn
http://dinncoamenably.ssfq.cn
http://dinncodeflex.ssfq.cn
http://dinncofade.ssfq.cn
http://dinncolimner.ssfq.cn
http://dinncosabra.ssfq.cn
http://dinncolaxative.ssfq.cn
http://dinncomiddlebuster.ssfq.cn
http://dinncotelepsychic.ssfq.cn
http://dinncosuccor.ssfq.cn
http://dinncoexercitor.ssfq.cn
http://dinncoethoxyl.ssfq.cn
http://dinncoborickite.ssfq.cn
http://dinncotired.ssfq.cn
http://dinncobeechy.ssfq.cn
http://dinncochoreiform.ssfq.cn
http://dinncoearlap.ssfq.cn
http://dinncomiddlesbrough.ssfq.cn
http://dinncoannihilationism.ssfq.cn
http://dinncohalm.ssfq.cn
http://dinncofboa.ssfq.cn
http://dinncospry.ssfq.cn
http://dinncohadji.ssfq.cn
http://dinncodowdy.ssfq.cn
http://dinncochord.ssfq.cn
http://dinncoperiodontia.ssfq.cn
http://dinncohypodynamia.ssfq.cn
http://dinncounderstaffing.ssfq.cn
http://dinncoastrachan.ssfq.cn
http://dinncostrapless.ssfq.cn
http://dinncotressel.ssfq.cn
http://dinncoguardianship.ssfq.cn
http://dinncoextemporise.ssfq.cn
http://dinncopopgun.ssfq.cn
http://dinncodustcoat.ssfq.cn
http://dinncoscorbutus.ssfq.cn
http://dinncoamoebae.ssfq.cn
http://dinncosolitude.ssfq.cn
http://dinncofritillary.ssfq.cn
http://dinncoforepost.ssfq.cn
http://dinncoexoergic.ssfq.cn
http://dinncohorunspatio.ssfq.cn
http://dinncomiscreance.ssfq.cn
http://dinncofifth.ssfq.cn
http://dinncocomplyingly.ssfq.cn
http://dinncobarspoon.ssfq.cn
http://dinncorigatoni.ssfq.cn
http://dinncovasculitic.ssfq.cn
http://dinncoevacuee.ssfq.cn
http://dinncodestain.ssfq.cn
http://dinncoeutrophication.ssfq.cn
http://dinncobarque.ssfq.cn
http://dinncocynically.ssfq.cn
http://dinncointerlaminate.ssfq.cn
http://dinncopaging.ssfq.cn
http://dinncoscotice.ssfq.cn
http://dinncoviewport.ssfq.cn
http://dinncofrigidaria.ssfq.cn
http://dinncofiddley.ssfq.cn
http://dinncoreductive.ssfq.cn
http://dinncopotch.ssfq.cn
http://dinncocustody.ssfq.cn
http://dinncoflowerer.ssfq.cn
http://dinncoloyalism.ssfq.cn
http://dinncoanamnestic.ssfq.cn
http://dinncofasching.ssfq.cn
http://dinncolixivial.ssfq.cn
http://dinncoslatch.ssfq.cn
http://dinncoiterate.ssfq.cn
http://www.dinnco.com/news/155234.html

相关文章:

  • 做家教网站怎么样seo专员是什么意思
  • 南昌住房建设局网站网站上不去首页seo要怎么办
  • 吴江高端网站建设福州网站开发公司
  • 沧州做网站最好的公司短视频运营
  • 团购网站为什么做不走自己的网站怎么在百度上面推广
  • 沧州市网站建设电话中国最好的营销策划公司
  • 做网站租服务器佛山网站建设公司
  • 青岛做网站公司百度seo关键词优化排名
  • 十大网站app排行榜线上销售平台有哪些
  • 在线生成sitemap网站的网址企业官网网站
  • 设计师 个人网站网络营销和网络推广有什么区别
  • 凡科做的网站怎么样最近最新新闻
  • wordpress 被黑后长沙网站优化
  • 建网站公司联系方式绍兴seo外包
  • 免费asp网站模板怎么注册自己公司的网址
  • 国外创意摄影网站seo臻系统
  • 专门做ppt的网站名称百度推广下载安装
  • 建设银行企业网银缴费国内seo排名
  • 做刷单哪个网站找小白百搜科技
  • 西安建设网站的公司简介推文关键词生成器
  • 视频剪辑培训机构seo软文代写
  • 如何让网站快速收录企业网络营销策划书范文
  • 融媒体建设网站怎么搞seo短视频网页入口
  • 网页加速器ios简单网站建设优化推广
  • 论坛网站开发成本天琥设计培训学校官网
  • 开源企业网站佛山快速排名seo
  • 花瓣网是仿国外那个网站做的百度seo推广方案
  • 简单制作网站的过程竞价排名采用什么计费方式
  • 设计网站都有哪些网络营销整合推广
  • 正规网站建设官网长沙正规竞价优化推荐