node+nginx-web部署
操作步骤如
FROM armdocker.rnd.ericsson.se/dockerhub-ericsson-remote/node:12.4.0-stretch
#设置工作目录
WORKDIR /home/node/
#进入目录
RUN cd /usr/local/bin/
#卸载angular/cli
RUN npm uninstall -g @angular/cli
#安装
RUN npm install -g @angular/cli@7.0.7
## 新的改变
docker built -t node/node-server:12.4.0 .
当前目录下需要有Dockerfile文件,
创建镜像名字为node/node-server版本为12.4.0,
# 名字版本根据需求自己填写
---> Running in 782b76336da9
npm WARN deprecated chokidar@2.0.4: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/@angular/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ @angular/cli@7.0.7
added 268 packages from 210 contributors in 169.889s
Removing intermediate container 782b76336da9
---> f8fa73a2c4f7
Successfully built f8fa73a2c4f7
Successfully tagged node-te:1.0.0
这里就是已经制作完成了,
docker run -it --name node -v /root/Lijunbao/dockerfile/node/:/home/node/ armdocker.rnd.ericsson.se/dockerhub-ericsson-remote/node:12.4.0-stretch
#挂载路径根据自己的需要填写
在刚刚挂载进去的目录去克隆 项目 https://项目地址
下载代码 git clone 地址
然后进入容器进入刚刚下载的项目木录,项目根目录执行 npm config set 这里写自己的项目注册码
在项目根目录;执行 npm install 等执行结束
在执行:ng build --prod
root@7296b93d63d3:/home/node/front-end# ng build --prod
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
Compiling @angular/core : es2015 as esm2015
Compiling @angular/compiler/testing : es2015 as esm2015
Compiling @angular/common : es2015 as esm2015
Compiling @angular/core/testing : es2015 as esm2015
Compiling highcharts-angular : es2015 as esm2015
Compiling @angular/platform-browser : es2015 as esm2015
Compiling @angular/common/http : es2015 as esm2015
Compiling @angular/platform-browser-dynamic : es2015 as esm2015
Compiling @angular/platform-browser/testing : es2015 as esm2015
Compiling @angular/forms : es2015 as esm2015
Compiling @angular/router : es2015 as esm2015
Compiling @angular/platform-browser-dynamic/testing : es2015 as esm2015
Compiling @auth0/angular-jwt : es2015 as esm2015
✔ Browser application bundle generation complete.
✔ ES5 bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.
Initial Chunk Files | Names | Size
main-es5.4c4e76c630a72fc01a2e.js | main | 4.11 MB
main-es2015.4c4e76c630a72fc01a2e.js | main | 4.04 MB
styles.22ee9a3597a62171cba7.css | styles | 897.67 kB
polyfills-es5.96c0de20f9a62a0566c1.js | polyfills-es5 | 263.99 kB
polyfills-es2015.5d0fc56e2293859fd538.js | polyfills | 171.41 kB
runtime-es2015.f8d01ea7e39dbb6811be.js | runtime | 2.44 kB
runtime-es5.f8d01ea7e39dbb6811be.js | runtime | 2.44 kB
| Initial ES5 Total | 5.24 MB
| Initial ES2015 Total | 5.08 MB
Lazy Chunk Files | Names | Size
10-es5.350508ea78d88a2a1548.js | - | 2.28 MB
10-es2015.350508ea78d88a2a1548.js | - | 2.27 MB
12-es5.f671fc00b5cad54dcf50.js | - | 1.16 MB
12-es2015.f671fc00b5cad54dcf50.js | - | 1.15 MB
11-es5.8c67852603932ec620dc.js | - | 530.40 kB
11-es2015.8c67852603932ec620dc.js | - | 515.71 kB
3-es5.4d1a7c5867c1a0241f3a.js | - | 78.90 kB
1-es5.5c64b19c23a9fbae3097.js | - | 76.08 kB
1-es2015.5c64b19c23a9fbae3097.js | - | 75.47 kB
3-es2015.4d1a7c5867c1a0241f3a.js | - | 74.48 kB
4-es5.90072d9f5c39a204457c.js | - | 71.89 kB
4-es2015.90072d9f5c39a204457c.js | - | 70.82 kB
5-es5.5b8258eb0ccb9dc161dc.js | - | 45.82 kB
5-es2015.5b8258eb0ccb9dc161dc.js | - | 45.34 kB
13-es5.e5a3e5705b8f34a6e145.js | - | 36.47 kB
13-es2015.e5a3e5705b8f34a6e145.js | - | 32.43 kB
common-es5.9e7bcf7d35c9f71fe2e9.js | common | 5.45 kB
common-es2015.9e7bcf7d35c9f71fe2e9.js | common | 4.96 kB
Build at: 2022-03-07T06:02:50.244Z - Hash: 971d7d65ec6a6020114e - Time: 197757ms
Warning: /home/node/front-end/src/app/app.component.less exceeded maximum budget. Budget 6.00 kB was not met by 888.17 kB with a total of 894.17 kB.
Warning: /home/node/front-end/src/app/capacity/capacity.component.less exceeded maximum budget. Budget 6.00 kB was not met by 888.32 kB with a total of 894.32 kB.
Warning: /home/node/front-end/src/app/rec-rbs/rec-rbs.component.less exceeded maximum budget. Budget 6.00 kB was not met by 888.32 kB with a total of 894.32 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/button/button.component.less exceeded maximum budget. Budget 6.00 kB was not met by 879 bytes with a total of 6.86 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/dropdown/dropdown.component.less exceeded maximum budget. Budget 6.00 kB was not met by 887 bytes with a total of 6.87 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/progress-bar/progress-bar.component.less exceeded maximum budget. Budget 6.00 kB was not met by 20.59 kB with a total of 26.59 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/accordion/accordion.component.less exceeded maximum budget. Budget 6.00 kB was not met by 44.15 kB with a total of 50.15 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/checkbox/checkbox.component.less exceeded maximum budget. Budget 6.00 kB was not met by 37.46 kB with a total of 43.46 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/date/datepicker.component.less exceeded maximum budget. Budget 6.00 kB was not met by 33.58 kB with a total of 39.58 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/dialog/dialog.component.less exceeded maximum budget. Budget 6.00 kB was not met by 32.63 kB with a total of 38.63 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/gauge/gauge.component.less exceeded maximum budget. Budget 6.00 kB was not met by 44.68 kB with a total of 50.68 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/input/input.component.less exceeded maximum budget. Budget 6.00 kB was not met by 55.21 kB with a total of 61.21 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/radio/radio-button.component.less exceeded maximum budget. Budget 6.00 kB was not met by 35.13 kB with a total of 41.13 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/syntax-highlight/syntax-highlight.component.less exceeded maximum budget. Budget 6.00 kB was not met by 47.50 kB with a total of 53.50 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/table/table.component.less exceeded maximum budget. Budget 6.00 kB was not met by 64.46 kB with a total of 70.46 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/switch/switch.component.less exceeded maximum budget. Budget 6.00 kB was not met by 44.72 kB with a total of 50.72 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/tooltip/tooltip.component.less exceeded maximum budget. Budget 6.00 kB was not met by 49.01 kB with a total of 55.01 kB.
m
Warning: /home/node/front-end/src/app/eds-angular/lib/components/tabs/tabs.component.less exceeded maximum budget. Budget 6.00 kB was not met by 43.55 kB with a total of 49.55 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/tree/tree.component.less exceeded maximum budget. Budget 6.00 kB was not met by 46.27 kB with a total of 52.27 kB.
Warning: /home/node/front-end/src/app/eds-angular/lib/components/select/select.component.css exceeded maximum budget. Budget 6.00 kB was not met by 6.92 kB with a total of 12.92 kB.
Warning: /home/node/front-end/src/app/eds-angular/test.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
Warning: /home/node/front-end/src/app/eds-angular/lib/angular.module.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
Warning: /home/node/front-end/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
Warning: /home/node/front-end/src/environments/environment.test.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
nginx容器部署web
编写dockerfile
# 基础镜像
FROM armdocker.rnd.ericsson.se/dockerhub-ericsson-remote/nginx
# 挂载目录
VOLUME /home/deploy/frontend/
# 创建目录
RUN mkdir -p /home/deploy/frontend/
# 指定路径
WORKDIR /home/deploy/frontend/
# 复制conf文件到路径
COPY ./nginx.conf /etc/nginx/nginx.conf
# 复制html文件到路径
COPY ./dist /home/deploy/frontend/
#指定暴露端口
EXPOSE 80
nginx配置文件修改location 模块地址改成你项目地址
构建镜像目录的时候需要有nginx.conf 和dist项目包
dcoker built -t nginx-web:1.0.0 .
docker run -it -d --name nginx-web-test -p 30005:80 -v /root/Lijunbao/dockerfile/nginx/nginx.conf:/etc/nginx/nginx.conf -v /home/deploy/frontend/dist/rvc-frontend/:/home/deploy/frontend/dist/rvc-frontend/ nginx-web:1.0.0
这里挂载目录需要写到/rvc-frontend/目录
我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:
- 全新的界面设计 ,将会带来全新的写作体验;
- 在创作中心设置你喜爱的代码高亮样式,Markdown 将代码片显示选择的高亮样式 进行展示;
- 增加了 图片拖拽 功能,你可以将本地的图片直接拖拽到编辑区域直接展示;
- 全新的 KaTeX数学公式 语法;
- 增加了支持甘特图的mermaid语法1 功能;
- 增加了 多屏幕编辑 Markdown文章功能;
- 增加了 焦点写作模式、预览模式、简洁写作模式、左右区域同步滚轮设置 等功能,功能按钮位于编辑区域与预览区域中间;
- 增加了 检查列表 功能。
功能快捷键
撤销:Ctrl/Command + Z
重做:Ctrl/Command + Y
加粗:Ctrl/Command + B
斜体:Ctrl/Command + I
标题:Ctrl/Command + Shift + H
无序列表:Ctrl/Command + Shift + U
有序列表:Ctrl/Command + Shift + O
检查列表:Ctrl/Command + Shift + C
插入代码:Ctrl/Command + Shift + K
插入链接:Ctrl/Command + Shift + L
插入图片:Ctrl/Command + Shift + G
查找:Ctrl/Command + F
替换:Ctrl/Command + G
合理的创建标题,有助于目录的生成
直接输入1次#,并按下space后,将生成1级标题。
输入2次#,并按下space后,将生成2级标题。
以此类推,我们支持6级标题。有助于使用TOC
语法后生成一个完美的目录。
如何改变文本的样式
强调文本 强调文本
加粗文本 加粗文本
标记文本
删除文本
H2O is是液体。
210 运算结果是 1024.
插入链接与图片
链接: link.
图片:
带尺寸的图片:
居中的图片:
居中并且带尺寸的图片:
当然,我们为了让用户更加便捷,我们增加了图片拖拽功能。
如何插入一段漂亮的代码片
去博客设置页面,选择一款你喜欢的代码片高亮样式,下面展示同样高亮的 代码片
.
// An highlighted block
var foo = 'bar';
生成一个适合你的列表
- 项目
- 项目
- 项目
- 项目
- 项目1
- 项目2
- 项目3
- 计划任务
- 完成任务
创建一个表格
一个简单的表格是这么创建的:
项目 | Value |
---|---|
电脑 | $1600 |
手机 | $12 |
导管 | $1 |
设定内容居中、居左、居右
使用:---------:
居中
使用:----------
居左
使用----------:
居右
第一列 | 第二列 | 第三列 |
---|---|---|
第一列文本居中 | 第二列文本居右 | 第三列文本居左 |
SmartyPants
SmartyPants将ASCII标点字符转换为“智能”印刷标点HTML实体。例如:
TYPE | ASCII | HTML |
---|---|---|
Single backticks | 'Isn't this fun?' | ‘Isn’t this fun?’ |
Quotes | "Isn't this fun?" | “Isn’t this fun?” |
Dashes | -- is en-dash, --- is em-dash | – is en-dash, — is em-dash |
创建一个自定义列表
-
Markdown
- Text-to- HTML conversion tool Authors
- John
- Luke
如何创建一个注脚
一个具有注脚的文本。2
注释也是必不可少的
Markdown将文本转换为 HTML。
KaTeX数学公式
您可以使用渲染LaTeX数学表达式 KaTeX:
Gamma公式展示 Γ ( n ) = ( n − 1 ) ! ∀ n ∈ N \Gamma(n) = (n-1)!\quad\forall n\in\mathbb N Γ(n)=(n−1)!∀n∈N 是通过欧拉积分
Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=∫0∞tz−1e−tdt.
新的甘特图功能,丰富你的文章
- 关于 甘特图 语法,参考 这儿,
UML 图表
可以使用UML图表进行渲染。 Mermaid. 例如下面产生的一个序列图:
这将产生一个流程图。:
- 关于 Mermaid 语法,参考 这儿,
FLowchart流程图
我们依旧会支持flowchart的流程图:
- 关于 Flowchart流程图 语法,参考 这儿.
导出与导入
导出
如果你想尝试使用此编辑器, 你可以在此篇文章任意编辑。当你完成了一篇文章的写作, 在上方工具栏找到 文章导出 ,生成一个.md文件或者.html文件进行本地保存。
导入
如果你想加载一篇你写过的.md文件,在上方工具栏可以选择导入功能进行对应扩展名的文件导入,
继续你的创作。