cmyr-template-cli 1.24.0 → 1.24.2
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/dist/plopfile.js
CHANGED
|
@@ -537,7 +537,7 @@ async function init(projectPath, answers) {
|
|
|
537
537
|
cwd: projectPath,
|
|
538
538
|
});
|
|
539
539
|
try {
|
|
540
|
-
await asyncExec('mvn
|
|
540
|
+
await asyncExec('mvn dependency:go-offline -B -Dmaven.test.skip=true', {
|
|
541
541
|
cwd: projectPath,
|
|
542
542
|
});
|
|
543
543
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# 阶段一:下载依赖
|
|
2
|
-
FROM golang:alpine as dependencies
|
|
2
|
+
FROM golang:1.21-alpine as dependencies
|
|
3
3
|
|
|
4
4
|
WORKDIR /home/app
|
|
5
5
|
|
|
6
6
|
COPY go.mod go.sum /home/app/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
RUN go version && \
|
|
9
|
+
go env -w CGO_ENABLED=0 && \
|
|
10
|
+
go env -w GO111MODULE=on && \
|
|
11
|
+
go env -w GOPROXY=https://goproxy.cn,direct && \
|
|
12
|
+
go clean --modcache && \
|
|
13
|
+
go mod download
|
|
12
14
|
|
|
13
15
|
# 阶段二:构建阶段
|
|
14
16
|
FROM dependencies as builder
|
|
@@ -17,7 +19,8 @@ WORKDIR /home/app
|
|
|
17
19
|
|
|
18
20
|
COPY . /home/app
|
|
19
21
|
|
|
20
|
-
RUN
|
|
22
|
+
RUN go version && \
|
|
23
|
+
go build main.go
|
|
21
24
|
|
|
22
25
|
# 阶段三:生产阶段
|
|
23
26
|
FROM scratch
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
FROM alpine
|
|
1
|
+
FROM python:3.10-alpine
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
&& apk add --no-cache --update python3 py3-pip \
|
|
8
|
-
&& python3 -V && pip3 -V \
|
|
3
|
+
WORKDIR /home/app
|
|
4
|
+
|
|
5
|
+
# 安装python3环境和gunicorn环境
|
|
6
|
+
RUN python3 -V && pip3 -V\
|
|
9
7
|
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
|
|
10
8
|
&& mkdir -p ~/.pip \
|
|
11
9
|
&& echo "[global]" > ~/.pip/pip.conf \
|
|
@@ -14,14 +12,10 @@ RUN echo "http://mirrors.aliyun.com/alpine/edge/main/" > /etc/apk/repositories \
|
|
|
14
12
|
&& echo "trusted-host=pypi.tuna.tsinghua.edu.cn" >> ~/.pip/pip.conf \
|
|
15
13
|
&& pip install --upgrade pip && pip install wheel
|
|
16
14
|
|
|
17
|
-
WORKDIR /home/app
|
|
18
|
-
|
|
19
15
|
COPY ./requirements.txt /home/app
|
|
20
16
|
|
|
21
17
|
RUN pip install -r requirements.txt
|
|
22
18
|
|
|
23
19
|
COPY . /home/app
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
CMD ["gunicorn", "app:app", "-p", "app.pid", "-b", "0.0.0.0:8080"]
|
|
21
|
+
CMD ["gunicorn", "app:app", "-p", "app.pid", "-b", "0.0.0.0:80"]
|
|
@@ -13,6 +13,9 @@ const files = [pkg.main || 'dist/index.js'].map((file) => path.join(projectRoot,
|
|
|
13
13
|
console.log('Start analyzing, project root:', projectRoot)
|
|
14
14
|
const { fileList: fileSet } = await nodeFileTrace(files, {
|
|
15
15
|
base: projectRoot,
|
|
16
|
+
paths: {
|
|
17
|
+
'@/': 'dist/',
|
|
18
|
+
},
|
|
16
19
|
})
|
|
17
20
|
let fileList = Array.from(fileSet)
|
|
18
21
|
console.log('Total touchable files:', fileList.length)
|