@lazycatcloud/lzc-cli 1.1.5 → 1.1.8
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/cmds/app.js +1 -5
- package/cmds/dev.js +11 -5
- package/lib/api.js +24 -7
- package/lib/app/index.js +93 -0
- package/lib/app/lpk_build.js +241 -0
- package/lib/app/lpk_create.js +201 -0
- package/lib/app/lpk_devshell.js +621 -0
- package/lib/app/lpk_installer.js +67 -0
- package/lib/appstore/login.js +134 -0
- package/lib/archiver.js +0 -42
- package/lib/autologin.js +82 -0
- package/lib/box/check_qemu.js +39 -16
- package/lib/box/hportal.js +7 -1
- package/lib/box/index.js +8 -7
- package/lib/box/qemu_vm_mgr.js +12 -11
- package/lib/dev.js +0 -4
- package/lib/env.js +16 -49
- package/lib/generator.js +2 -2
- package/lib/sdk.js +5 -6
- package/lib/utils.js +66 -144
- package/package.json +8 -3
- package/scripts/cli.js +91 -12
- package/template/_lazycat/debug/shell/Dockerfile +5 -3
- package/template/_lazycat/debug/shell/docker-compose.override.yml.in +2 -12
- package/template/_lazycat/debug/shell/entrypoint.sh +3 -1
- package/template/_lpk/Dockerfile.in +8 -0
- package/template/_lpk/devshell/Dockerfile +18 -0
- package/template/_lpk/devshell/build.sh +5 -0
- package/template/_lpk/devshell/entrypoint.sh +8 -0
- package/template/_lpk/devshell/sshd_config +117 -0
- package/template/_lpk/manifest.yml.in +17 -0
- package/template/_lpk/sync/Dockerfile +16 -0
- package/template/_lpk/sync/build.sh +5 -0
- package/template/_lpk/sync/entrypoint.sh +8 -0
- package/template/_lpk/sync/sshd_config +117 -0
- package/template/_lpk/sync.manifest.yml.in +3 -0
- package/template/golang/build.sh +6 -0
- package/template/golang/lzc-build.yml +52 -0
- package/template/ionic_vue3/lzc-build.yml +53 -0
- package/template/ionic_vue3/vite.config.ts +1 -1
- package/template/release/golang/build.sh +1 -1
- package/template/release/ionic_vue3/Dockerfile +1 -1
- package/template/release/ionic_vue3/build.sh +1 -3
- package/template/release/ionic_vue3/docker-compose.yml.in +0 -5
- package/template/release/vue/Dockerfile +1 -1
- package/template/release/vue/build.sh +2 -3
- package/template/release/vue/docker-compose.yml.in +0 -5
- package/template/vue/lzc-build.yml +53 -0
- package/template/vue/src/main.js +3 -14
- package/template/vue/vue.config.js +2 -1
- package/template/_lazycat/debug/shell/nginx.conf.template +0 -64
- package/template/vue/src/lzc.js +0 -110
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
|
|
2
|
+
|
|
3
|
+
# This is the sshd server system-wide configuration file. See
|
|
4
|
+
# sshd_config(5) for more information.
|
|
5
|
+
|
|
6
|
+
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
7
|
+
|
|
8
|
+
# The strategy used for options in the default sshd_config shipped with
|
|
9
|
+
# OpenSSH is to specify options with their default value where
|
|
10
|
+
# possible, but leave them commented. Uncommented options override the
|
|
11
|
+
# default value.
|
|
12
|
+
|
|
13
|
+
# Port 22
|
|
14
|
+
#AddressFamily any
|
|
15
|
+
#ListenAddress 0.0.0.0
|
|
16
|
+
#ListenAddress ::
|
|
17
|
+
|
|
18
|
+
#HostKey /etc/ssh/ssh_host_rsa_key
|
|
19
|
+
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
|
20
|
+
#HostKey /etc/ssh/ssh_host_ed25519_key
|
|
21
|
+
|
|
22
|
+
# Ciphers and keying
|
|
23
|
+
#RekeyLimit default none
|
|
24
|
+
|
|
25
|
+
# Logging
|
|
26
|
+
#SyslogFacility AUTH
|
|
27
|
+
#LogLevel INFO
|
|
28
|
+
|
|
29
|
+
# Authentication:
|
|
30
|
+
|
|
31
|
+
#LoginGraceTime 2m
|
|
32
|
+
PermitRootLogin yes
|
|
33
|
+
#StrictModes yes
|
|
34
|
+
#MaxAuthTries 6
|
|
35
|
+
#MaxSessions 10
|
|
36
|
+
|
|
37
|
+
PubkeyAuthentication yes
|
|
38
|
+
|
|
39
|
+
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
|
|
40
|
+
# but this is overridden so installations will only check .ssh/authorized_keys
|
|
41
|
+
AuthorizedKeysFile /lzcapp/pkg/content/devshell/authorized_keys
|
|
42
|
+
|
|
43
|
+
#AuthorizedPrincipalsFile none
|
|
44
|
+
|
|
45
|
+
#AuthorizedKeysCommand none
|
|
46
|
+
#AuthorizedKeysCommandUser nobody
|
|
47
|
+
|
|
48
|
+
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
|
49
|
+
#HostbasedAuthentication no
|
|
50
|
+
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
|
51
|
+
# HostbasedAuthentication
|
|
52
|
+
#IgnoreUserKnownHosts no
|
|
53
|
+
# Don't read the user's ~/.rhosts and ~/.shosts files
|
|
54
|
+
#IgnoreRhosts yes
|
|
55
|
+
|
|
56
|
+
# To disable tunneled clear text passwords, change to no here!
|
|
57
|
+
PasswordAuthentication no
|
|
58
|
+
PermitEmptyPasswords no
|
|
59
|
+
|
|
60
|
+
# Change to no to disable s/key passwords
|
|
61
|
+
#KbdInteractiveAuthentication yes
|
|
62
|
+
|
|
63
|
+
# Kerberos options
|
|
64
|
+
#KerberosAuthentication no
|
|
65
|
+
#KerberosOrLocalPasswd yes
|
|
66
|
+
#KerberosTicketCleanup yes
|
|
67
|
+
#KerberosGetAFSToken no
|
|
68
|
+
|
|
69
|
+
# GSSAPI options
|
|
70
|
+
#GSSAPIAuthentication no
|
|
71
|
+
#GSSAPICleanupCredentials yes
|
|
72
|
+
|
|
73
|
+
# Set this to 'yes' to enable PAM authentication, account processing,
|
|
74
|
+
# and session processing. If this is enabled, PAM authentication will
|
|
75
|
+
# be allowed through the KbdInteractiveAuthentication and
|
|
76
|
+
# PasswordAuthentication. Depending on your PAM configuration,
|
|
77
|
+
# PAM authentication via KbdInteractiveAuthentication may bypass
|
|
78
|
+
# the setting of "PermitRootLogin without-password".
|
|
79
|
+
# If you just want the PAM account and session checks to run without
|
|
80
|
+
# PAM authentication, then enable this but set PasswordAuthentication
|
|
81
|
+
# and KbdInteractiveAuthentication to 'no'.
|
|
82
|
+
#UsePAM no
|
|
83
|
+
|
|
84
|
+
#AllowAgentForwarding yes
|
|
85
|
+
# Feel free to re-enable these if your use case requires them.
|
|
86
|
+
AllowTcpForwarding yes
|
|
87
|
+
GatewayPorts yes
|
|
88
|
+
X11Forwarding no
|
|
89
|
+
#X11DisplayOffset 10
|
|
90
|
+
#X11UseLocalhost yes
|
|
91
|
+
#PermitTTY yes
|
|
92
|
+
#PrintMotd yes
|
|
93
|
+
#PrintLastLog yes
|
|
94
|
+
#TCPKeepAlive yes
|
|
95
|
+
#PermitUserEnvironment no
|
|
96
|
+
#Compression delayed
|
|
97
|
+
ClientAliveInterval 3
|
|
98
|
+
ClientAliveCountMax 0
|
|
99
|
+
#UseDNS no
|
|
100
|
+
#PidFile /run/sshd.pid
|
|
101
|
+
#MaxStartups 10:30:100
|
|
102
|
+
#PermitTunnel no
|
|
103
|
+
#ChrootDirectory none
|
|
104
|
+
#VersionAddendum none
|
|
105
|
+
|
|
106
|
+
# no default banner path
|
|
107
|
+
#Banner none
|
|
108
|
+
|
|
109
|
+
# override default of no subsystems
|
|
110
|
+
Subsystem sftp /usr/lib/ssh/sftp-server
|
|
111
|
+
|
|
112
|
+
# Example of overriding settings on a per-user basis
|
|
113
|
+
#Match User anoncvs
|
|
114
|
+
# X11Forwarding no
|
|
115
|
+
# AllowTcpForwarding no
|
|
116
|
+
# PermitTTY no
|
|
117
|
+
# ForceCommand cvs server
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
lzc-sdk-version: 0.1
|
|
2
|
+
|
|
3
|
+
package: ${package} # app的唯一标识符
|
|
4
|
+
version: ${version} # app的版本
|
|
5
|
+
name: ${name} # app名称
|
|
6
|
+
description: ${description} # app描述
|
|
7
|
+
icon: ./icon.svg #必须是当前pkg内路径,会提供给启动器等地方使用
|
|
8
|
+
|
|
9
|
+
license: https://choosealicense.com/licenses/mit/
|
|
10
|
+
homepage: ${homepage} # 出现bug时候提交反馈的地方
|
|
11
|
+
author: ${author} # app author
|
|
12
|
+
|
|
13
|
+
#application作为一个特殊的container运行,对应的service名称为固定的`app`,其他service可以通过此名称与app进行通讯
|
|
14
|
+
application:
|
|
15
|
+
subdomain: ${subdomain} #期望的app域名
|
|
16
|
+
routes:
|
|
17
|
+
- /=file:///lzcapp/pkg/content/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
FROM alpine
|
|
2
|
+
|
|
3
|
+
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
|
4
|
+
|
|
5
|
+
RUN apk add --no-cache openssh openssl sshfs rsync \
|
|
6
|
+
&& echo "root:root" | chpasswd
|
|
7
|
+
|
|
8
|
+
EXPOSE 22
|
|
9
|
+
|
|
10
|
+
COPY sshd_config /etc/ssh/sshd_config
|
|
11
|
+
|
|
12
|
+
COPY entrypoint.sh /entrypoint.sh
|
|
13
|
+
|
|
14
|
+
RUN chmod +x /entrypoint.sh
|
|
15
|
+
|
|
16
|
+
CMD ["./entrypoint.sh"]
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
|
|
2
|
+
|
|
3
|
+
# This is the sshd server system-wide configuration file. See
|
|
4
|
+
# sshd_config(5) for more information.
|
|
5
|
+
|
|
6
|
+
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
7
|
+
|
|
8
|
+
# The strategy used for options in the default sshd_config shipped with
|
|
9
|
+
# OpenSSH is to specify options with their default value where
|
|
10
|
+
# possible, but leave them commented. Uncommented options override the
|
|
11
|
+
# default value.
|
|
12
|
+
|
|
13
|
+
# Port 22
|
|
14
|
+
#AddressFamily any
|
|
15
|
+
#ListenAddress 0.0.0.0
|
|
16
|
+
#ListenAddress ::
|
|
17
|
+
|
|
18
|
+
#HostKey /etc/ssh/ssh_host_rsa_key
|
|
19
|
+
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
|
20
|
+
#HostKey /etc/ssh/ssh_host_ed25519_key
|
|
21
|
+
|
|
22
|
+
# Ciphers and keying
|
|
23
|
+
#RekeyLimit default none
|
|
24
|
+
|
|
25
|
+
# Logging
|
|
26
|
+
#SyslogFacility AUTH
|
|
27
|
+
#LogLevel INFO
|
|
28
|
+
|
|
29
|
+
# Authentication:
|
|
30
|
+
|
|
31
|
+
#LoginGraceTime 2m
|
|
32
|
+
PermitRootLogin yes
|
|
33
|
+
#StrictModes yes
|
|
34
|
+
#MaxAuthTries 6
|
|
35
|
+
#MaxSessions 10
|
|
36
|
+
|
|
37
|
+
PubkeyAuthentication yes
|
|
38
|
+
|
|
39
|
+
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
|
|
40
|
+
# but this is overridden so installations will only check .ssh/authorized_keys
|
|
41
|
+
AuthorizedKeysFile /lzcapp/pkg/content/devshell/authorized_keys
|
|
42
|
+
|
|
43
|
+
#AuthorizedPrincipalsFile none
|
|
44
|
+
|
|
45
|
+
#AuthorizedKeysCommand none
|
|
46
|
+
#AuthorizedKeysCommandUser nobody
|
|
47
|
+
|
|
48
|
+
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
|
|
49
|
+
#HostbasedAuthentication no
|
|
50
|
+
# Change to yes if you don't trust ~/.ssh/known_hosts for
|
|
51
|
+
# HostbasedAuthentication
|
|
52
|
+
#IgnoreUserKnownHosts no
|
|
53
|
+
# Don't read the user's ~/.rhosts and ~/.shosts files
|
|
54
|
+
#IgnoreRhosts yes
|
|
55
|
+
|
|
56
|
+
# To disable tunneled clear text passwords, change to no here!
|
|
57
|
+
PasswordAuthentication no
|
|
58
|
+
PermitEmptyPasswords no
|
|
59
|
+
|
|
60
|
+
# Change to no to disable s/key passwords
|
|
61
|
+
#KbdInteractiveAuthentication yes
|
|
62
|
+
|
|
63
|
+
# Kerberos options
|
|
64
|
+
#KerberosAuthentication no
|
|
65
|
+
#KerberosOrLocalPasswd yes
|
|
66
|
+
#KerberosTicketCleanup yes
|
|
67
|
+
#KerberosGetAFSToken no
|
|
68
|
+
|
|
69
|
+
# GSSAPI options
|
|
70
|
+
#GSSAPIAuthentication no
|
|
71
|
+
#GSSAPICleanupCredentials yes
|
|
72
|
+
|
|
73
|
+
# Set this to 'yes' to enable PAM authentication, account processing,
|
|
74
|
+
# and session processing. If this is enabled, PAM authentication will
|
|
75
|
+
# be allowed through the KbdInteractiveAuthentication and
|
|
76
|
+
# PasswordAuthentication. Depending on your PAM configuration,
|
|
77
|
+
# PAM authentication via KbdInteractiveAuthentication may bypass
|
|
78
|
+
# the setting of "PermitRootLogin without-password".
|
|
79
|
+
# If you just want the PAM account and session checks to run without
|
|
80
|
+
# PAM authentication, then enable this but set PasswordAuthentication
|
|
81
|
+
# and KbdInteractiveAuthentication to 'no'.
|
|
82
|
+
#UsePAM no
|
|
83
|
+
|
|
84
|
+
#AllowAgentForwarding yes
|
|
85
|
+
# Feel free to re-enable these if your use case requires them.
|
|
86
|
+
AllowTcpForwarding yes
|
|
87
|
+
GatewayPorts yes
|
|
88
|
+
X11Forwarding no
|
|
89
|
+
#X11DisplayOffset 10
|
|
90
|
+
#X11UseLocalhost yes
|
|
91
|
+
#PermitTTY yes
|
|
92
|
+
#PrintMotd yes
|
|
93
|
+
#PrintLastLog yes
|
|
94
|
+
#TCPKeepAlive yes
|
|
95
|
+
#PermitUserEnvironment no
|
|
96
|
+
#Compression delayed
|
|
97
|
+
ClientAliveInterval 3
|
|
98
|
+
ClientAliveCountMax 0
|
|
99
|
+
#UseDNS no
|
|
100
|
+
#PidFile /run/sshd.pid
|
|
101
|
+
#MaxStartups 10:30:100
|
|
102
|
+
#PermitTunnel no
|
|
103
|
+
#ChrootDirectory none
|
|
104
|
+
#VersionAddendum none
|
|
105
|
+
|
|
106
|
+
# no default banner path
|
|
107
|
+
#Banner none
|
|
108
|
+
|
|
109
|
+
# override default of no subsystems
|
|
110
|
+
Subsystem sftp /usr/lib/ssh/sftp-server
|
|
111
|
+
|
|
112
|
+
# Example of overriding settings on a per-user basis
|
|
113
|
+
#Match User anoncvs
|
|
114
|
+
# X11Forwarding no
|
|
115
|
+
# AllowTcpForwarding no
|
|
116
|
+
# PermitTTY no
|
|
117
|
+
# ForceCommand cvs server
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest.yml 文件中定义的值
|
|
2
|
+
|
|
3
|
+
# buildscript
|
|
4
|
+
# - 可以为构建脚本的路径地址
|
|
5
|
+
# - 如果构建命令简单,也可以直接写 sh 的命令
|
|
6
|
+
buildscript: ./build.sh
|
|
7
|
+
|
|
8
|
+
# manifest: 指定 lpk 包的 manifest.yml 文件路径
|
|
9
|
+
manifest: ./manifest.yml
|
|
10
|
+
|
|
11
|
+
# contentdir: 指定打包的内容,将会打包到 lpk 中
|
|
12
|
+
contentdir: ./build
|
|
13
|
+
|
|
14
|
+
# pkgout: lpk 包的输出路径
|
|
15
|
+
pkgout: ./
|
|
16
|
+
|
|
17
|
+
# icon 指定 lpk 包 icon 的路径路径,如果不指定将会警告
|
|
18
|
+
# icon 仅仅允许 png 后缀的文件
|
|
19
|
+
icon: ./lazycat.png
|
|
20
|
+
|
|
21
|
+
# devshell 自定义应用的开发容器环境
|
|
22
|
+
# - routers 指定应用容器的访问路由
|
|
23
|
+
|
|
24
|
+
# devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
|
|
25
|
+
# devshell:
|
|
26
|
+
# routers:
|
|
27
|
+
# - /=http://127.0.0.1:8080
|
|
28
|
+
|
|
29
|
+
# devshell 指定 image 的情况
|
|
30
|
+
# devshell:
|
|
31
|
+
# routes:
|
|
32
|
+
# - /=http://127.0.0.1:3000
|
|
33
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:0.0.4
|
|
34
|
+
|
|
35
|
+
# devshell 指定构建Dockerfile
|
|
36
|
+
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
37
|
+
# devshell:
|
|
38
|
+
# routes:
|
|
39
|
+
# - /=http://127.0.0.1:3000
|
|
40
|
+
# image: ${package}-devshell:${version}
|
|
41
|
+
# pull_policy: build
|
|
42
|
+
# build: .
|
|
43
|
+
|
|
44
|
+
# dvshell 指定开发依赖的情况
|
|
45
|
+
# 这种情况下,选用 apline:3.16 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
|
+
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
|
+
devshell:
|
|
48
|
+
routes:
|
|
49
|
+
- /=http://127.0.0.1:3000
|
|
50
|
+
dependencies:
|
|
51
|
+
- go
|
|
52
|
+
- vim
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest.yml 文件中定义的值
|
|
2
|
+
|
|
3
|
+
# buildscript
|
|
4
|
+
# - 可以为构建脚本的路径地址
|
|
5
|
+
# - 如果构建命令简单,也可以直接写 sh 的命令
|
|
6
|
+
buildscript: npm run build
|
|
7
|
+
|
|
8
|
+
# manifest: 指定 lpk 包的 manifest.yml 文件路径
|
|
9
|
+
manifest: ./manifest.yml
|
|
10
|
+
|
|
11
|
+
# contentdir: 指定打包的内容,将会打包到 lpk 中
|
|
12
|
+
contentdir: ./dist
|
|
13
|
+
|
|
14
|
+
# pkgout: lpk 包的输出路径
|
|
15
|
+
pkgout: ./
|
|
16
|
+
|
|
17
|
+
# icon 指定 lpk 包 icon 的路径路径,如果不指定将会警告
|
|
18
|
+
# icon 仅仅允许 png 后缀的文件
|
|
19
|
+
icon: ./lazycat.png
|
|
20
|
+
|
|
21
|
+
# devshell 自定义应用的开发容器环境
|
|
22
|
+
# - routers 指定应用容器的访问路由
|
|
23
|
+
|
|
24
|
+
# devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
|
|
25
|
+
# devshell:
|
|
26
|
+
# routers:
|
|
27
|
+
# - /=http://127.0.0.1:8080
|
|
28
|
+
|
|
29
|
+
# devshell 指定 image 的情况
|
|
30
|
+
# devshell:
|
|
31
|
+
# routes:
|
|
32
|
+
# - /=http://127.0.0.1:3000
|
|
33
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:0.0.4
|
|
34
|
+
|
|
35
|
+
# devshell 指定构建Dockerfile
|
|
36
|
+
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
37
|
+
# devshell:
|
|
38
|
+
# routes:
|
|
39
|
+
# - /=http://127.0.0.1:3000
|
|
40
|
+
# image: ${package}-devshell:${version}
|
|
41
|
+
# pull_policy: build
|
|
42
|
+
# build: .
|
|
43
|
+
|
|
44
|
+
# dvshell 指定开发依赖的情况
|
|
45
|
+
# 这种情况下,选用 apline:3.16 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
|
+
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
|
+
devshell:
|
|
48
|
+
routes:
|
|
49
|
+
- /=http://127.0.0.1:3000
|
|
50
|
+
dependencies:
|
|
51
|
+
- nodejs
|
|
52
|
+
- vim
|
|
53
|
+
- npm
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest.yml 文件中定义的值
|
|
2
|
+
|
|
3
|
+
# buildscript
|
|
4
|
+
# - 可以为构建脚本的路径地址
|
|
5
|
+
# - 如果构建命令简单,也可以直接写 sh 的命令
|
|
6
|
+
buildscript: npm run build
|
|
7
|
+
|
|
8
|
+
# manifest: 指定 lpk 包的 manifest.yml 文件路径
|
|
9
|
+
manifest: ./manifest.yml
|
|
10
|
+
|
|
11
|
+
# contentdir: 指定打包的内容,将会打包到 lpk 中
|
|
12
|
+
contentdir: ./dist
|
|
13
|
+
|
|
14
|
+
# pkgout: lpk 包的输出路径
|
|
15
|
+
pkgout: ./
|
|
16
|
+
|
|
17
|
+
# icon 指定 lpk 包 icon 的路径路径,如果不指定将会警告
|
|
18
|
+
# icon 仅仅允许 png 后缀的文件
|
|
19
|
+
icon: ./lazycat.png
|
|
20
|
+
|
|
21
|
+
# devshell 自定义应用的开发容器环境
|
|
22
|
+
# - routers 指定应用容器的访问路由
|
|
23
|
+
|
|
24
|
+
# devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:latest
|
|
25
|
+
# devshell:
|
|
26
|
+
# routers:
|
|
27
|
+
# - /=http://127.0.0.1:8080
|
|
28
|
+
|
|
29
|
+
# devshell 指定 image 的情况
|
|
30
|
+
# devshell:
|
|
31
|
+
# routes:
|
|
32
|
+
# - /=http://127.0.0.1:3000
|
|
33
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:0.0.4
|
|
34
|
+
|
|
35
|
+
# devshell 指定构建Dockerfile
|
|
36
|
+
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
37
|
+
# devshell:
|
|
38
|
+
# routes:
|
|
39
|
+
# - /=http://127.0.0.1:3000
|
|
40
|
+
# image: ${package}-devshell:${version}
|
|
41
|
+
# pull_policy: build
|
|
42
|
+
# build: .
|
|
43
|
+
|
|
44
|
+
# dvshell 指定开发依赖的情况
|
|
45
|
+
# 这种情况下,选用 apline:3.16 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
|
+
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
|
+
devshell:
|
|
48
|
+
routes:
|
|
49
|
+
- /=http://127.0.0.1:3000
|
|
50
|
+
dependencies:
|
|
51
|
+
- nodejs
|
|
52
|
+
- vim
|
|
53
|
+
- npm
|
package/template/vue/src/main.js
CHANGED
|
@@ -3,17 +3,6 @@ import App from "./App.vue";
|
|
|
3
3
|
|
|
4
4
|
Vue.config.productionTip = false;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
lzc
|
|
11
|
-
.autoLogin()
|
|
12
|
-
.then(() => {
|
|
13
|
-
new Vue({
|
|
14
|
-
render: (h) => h(App),
|
|
15
|
-
}).$mount("#app");
|
|
16
|
-
})
|
|
17
|
-
.catch((e) => {
|
|
18
|
-
console.error(e);
|
|
19
|
-
});
|
|
6
|
+
new Vue({
|
|
7
|
+
render: (h) => h(App),
|
|
8
|
+
}).$mount("#app");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const nodeVersions = process.versions.node.split(".");
|
|
2
2
|
if (
|
|
3
3
|
nodeVersions[0] >= 17 &&
|
|
4
|
-
|
|
4
|
+
process.env["NODE_OPTIONS"] &&
|
|
5
|
+
process.env["NODE_OPTIONS"].search(/--openssl-legacy-provider/) == -1
|
|
5
6
|
) {
|
|
6
7
|
console.warn(`
|
|
7
8
|
当前 nodejs 版本为 ${process.version}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# need to use root permission to connect unix socket
|
|
2
|
-
user root;
|
|
3
|
-
worker_processes 1;
|
|
4
|
-
|
|
5
|
-
error_log /var/log/nginx/error.log info;
|
|
6
|
-
pid /var/run/nginx.pid;
|
|
7
|
-
|
|
8
|
-
events {
|
|
9
|
-
worker_connections 1024;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
stream {
|
|
13
|
-
upstream tunnel {
|
|
14
|
-
server ${APP_DEBUG_SHELL}:22;
|
|
15
|
-
}
|
|
16
|
-
server {
|
|
17
|
-
listen [::]:22 ipv6only=on;
|
|
18
|
-
proxy_pass tunnel;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
http {
|
|
24
|
-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
25
|
-
'$status $body_bytes_sent "$http_referer" '
|
|
26
|
-
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
27
|
-
|
|
28
|
-
access_log /var/log/nginx/access.log main;
|
|
29
|
-
|
|
30
|
-
sendfile on;
|
|
31
|
-
#tcp_nopush on;
|
|
32
|
-
|
|
33
|
-
keepalive_timeout 65;
|
|
34
|
-
|
|
35
|
-
map $http_upgrade $connection_upgrade {
|
|
36
|
-
default upgrade;
|
|
37
|
-
'' close;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
#gzip on;
|
|
41
|
-
|
|
42
|
-
server {
|
|
43
|
-
listen *:${APP_DEBUG_PORT};
|
|
44
|
-
|
|
45
|
-
error_page 502 503 504 /50x.html;
|
|
46
|
-
|
|
47
|
-
large_client_header_buffers 4 32k;
|
|
48
|
-
|
|
49
|
-
location = /50x.html {
|
|
50
|
-
root /etc/nginx;
|
|
51
|
-
internal;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
location / {
|
|
55
|
-
proxy_pass http://${APP_DEBUG_SHELL}:${APP_DEBUG_PORT}/;
|
|
56
|
-
proxy_set_header Host localhost;
|
|
57
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
58
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
59
|
-
proxy_set_header Upgrade $http_upgrade;
|
|
60
|
-
proxy_set_header Connection $connection_upgrade;
|
|
61
|
-
proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|