@winner-fed/winner-deploy 3.1.0 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/genDockerPackage.js +1 -1
- package/templates/see/bash/.DS_Store +0 -0
- package/templates/see/bash/deploy.xml +0 -1
- package/templates/see/bash/scripts/install.sh +3 -1
- package/templates/see/bash/scripts/uninstall.sh +1 -1
- package/templates/see/docker/Dockerfile +8 -7
package/package.json
CHANGED
package/src/genDockerPackage.js
CHANGED
|
@@ -41,7 +41,7 @@ exports.genDockerPackage = function genDockerPackage (seePackageName, options, h
|
|
|
41
41
|
|
|
42
42
|
// 如果项目根目录下已经存在 Dockerfile,则不进行重新生成
|
|
43
43
|
if (!fs.pathExistsSync(path.resolve(process.cwd(), `docker/Dockerfile`))) {
|
|
44
|
-
fs.outputFileSync(path.resolve(process.cwd(), `docker/Dockerfile`), genDockerfile({ name }));
|
|
44
|
+
fs.outputFileSync(path.resolve(process.cwd(), `docker/Dockerfile`), genDockerfile({ name, type }));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// 缺少 scripts 目录会导致 SEE 平台上传发布物报错
|
|
Binary file
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
<variables describe="集群基本参数">
|
|
30
30
|
<field name="user" label="安装用户" type="input">root</field>
|
|
31
31
|
<field name="workspace" label="前端安装目录" type="input" tooltip="IAR上存放前端根目录">/usr/local/nginx/html</field>
|
|
32
|
-
<field name="isSubsystem" label="是否是子系统" type="select" options="false:主系统;true:子系统" required="true" tooltip="默认主系统">false</field>
|
|
33
32
|
${ variables }
|
|
34
33
|
</variables>
|
|
35
34
|
<config path="./${ name }/${ configFileName }.js" encoding="UTF-8"/>
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
#[install]
|
|
3
3
|
# chmod -R 755 .
|
|
4
4
|
# 拷贝前端工程文件到运行目录
|
|
5
|
-
if [ "
|
|
5
|
+
if [ "{{type}}" = "subsystem" ]; then
|
|
6
6
|
# 子系统执行逻辑
|
|
7
|
+
# 程序执行的当前路径,除了tmp文件夹,别的都删除,然后将 tmp/source 的所有文件及文件夹都拷贝到 workspace 目录下
|
|
7
8
|
ls -I tmp | xargs rm -rf
|
|
8
9
|
\cp -rf tmp/source/* ${workspace}/../
|
|
9
10
|
else
|
|
10
11
|
# 主系统执行逻辑
|
|
11
12
|
if [ -d "${workspace}/{{name}}" ]; then
|
|
12
13
|
cd "${workspace}/{{name}}"
|
|
14
|
+
# 查看文件名带有 "manifest." 文件,然后进行删除
|
|
13
15
|
ls | grep "manifest." | xargs rm -rf
|
|
14
16
|
rm -rf frame common static sysconfig.js index.html
|
|
15
17
|
cd -
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Dockerfile用于生成应用镜像,非特殊情况请勿修改
|
|
2
2
|
FROM package.hundsun.com/public-docker-local/freestyle/hswealth/nginx:1.18.0-alpine-see
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
# 使用 WORKDIR 指令可以来指定工作目录(或者称为当前目录),以后各层的当前目录就被改为指定的目录,如该目录不存在, WORKDIR 会帮你建立目录
|
|
5
|
+
WORKDIR ${name}
|
|
6
|
+
<% if (type === 'bizframe') { %>
|
|
7
|
+
COPY html "./"
|
|
8
|
+
<% } else { %>
|
|
9
|
+
COPY html/${name} "./"
|
|
10
|
+
<% } %>
|
|
11
|
+
RUN chmod -R a+x "./"
|