-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-spec-x1-mysql.toml
93 lines (74 loc) · 1.77 KB
/
app-spec-x1-mysql.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
kind = "AppSpec"
roles = [101, 100]
type_tags = ["devops", "enterprise"]
[meta]
id = "gitea-x1"
name = "Gitea 源码管理系统"
version = "1.1"
subtitle = "开源、轻量、自主部署的 Git 源码管理系统"
[[depends]]
id = "sysinner-mysql-x1"
name = "MySQL x1"
version = "1.0"
[[packages]]
name = "gitea"
version = "1.13"
[[executors]]
name = "gitea-main"
exec_start = """
DAEMON=/opt/gitea/gitea/gitea
DAEMON_ARGS="web"
NAME=gitea
if pidof $NAME; then
exit 0
fi
if [ ! -d "/opt/gitea/gitea" ]; then
mkdir -p /opt/gitea/gitea
fi
rsync -av {{.inpack_prefix_gitea}}/* /opt/gitea/gitea/
/home/action/.sysinner/inagent config-render --app-spec gitea-x1 --in /opt/gitea/gitea/misc/app.ini --out /opt/gitea/gitea/custom/conf/app.ini
/home/action/.sysinner/inagent config-merge --app-spec gitea-x1 --config /opt/gitea/gitea/custom/conf/app.ini --with-config-field cfg/gitea/app_ini
cd /opt/gitea/gitea/
$DAEMON $DAEMON_ARGS >> /home/action/var/log/gitea.log 2>&1 &
"""
exec_stop = "killall gitea"
[executors.plan]
on_tick = 60
[[service_ports]]
name = "http"
box_port = 3000
[[service_ports]]
name = "gitssh"
box_port = 3022
[configurator]
name = "cfg/gitea"
[[configurator.fields]]
name = "app_name"
title = "应用名称"
type = 1
default = "Gitea"
[[configurator.fields]]
name = "app_ini"
title = "ini 增量配置"
type = 304
default = """
[i18n]
LANGS = en-US,zh-CN
NAMES = English,中文
[service]
ENABLE_CAPTCHA = true
DISABLE_REGISTRATION = false
REQUIRE_SIGNIN_VIEW = true
"""
[exp_res]
cpu_min = 2
mem_min = 384
vol_min = 5
[exp_deploy]
rep_min = 1
rep_max = 1
sys_state = 1
network_mode = 1
[[urls]]
name = "gdoc"
url = "https://www.sysinner.cn/gdoc/view/app-guide/gitea/x1.md"