-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-spec-x1.toml
174 lines (131 loc) · 3.13 KB
/
app-spec-x1.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
kind = "AppSpec"
last_version = "0.0"
roles = [101, 100]
runtime_images = ["sysinner/innerstack-g3:el8"]
type_tags = ["devops", "enterprise"]
[meta]
id = "gitea-x1"
name = "Gitea 源码管理系统"
version = "1.1.22"
created = 0
updated = 0
subtitle = "开源、轻量、自主部署的 Git 源码管理系统"
[[packages]]
name = "gitea"
version = "1.22"
[[executors]]
name = "gitea-main"
updated = 0
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/v1/app.example.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"
priority = 0
[executors.plan]
on_boot = true
on_tick = 0
[[service_ports]]
name = "http"
box_port = 3000
host_port = 0
[[service_ports]]
name = "gitssh"
box_port = 3022
host_port = 0
[configurator]
name = "cfg/gitea"
[[configurator.fields]]
name = "app_name"
title = "应用名称"
type = 1
default = "Gitea"
[[configurator.fields]]
name = "app_ini"
title = "ini 增量配置"
type = 304
default = """;; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation.
APP_NAME = {{.cfg/gitea/app_name}}
RUN_USER = action
RUN_MODE = prod
[server]
PROTOCOL = http
; DOMAIN = code.sysinner.cn
DOMAIN = {{.pod/oprep/port/http/lan_addr}}
ROOT_URL = %(PROTOCOL)s://{{.pod/oprep/port/http/lan_addr}}:{{.pod/oprep/port/http/host_port}}/
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 3000
REDIRECT_OTHER_PORT = false
PORT_TO_REDIRECT = 80
START_SSH_SERVER = true
SSH_LISTEN_HOST = 0.0.0.0
SSH_LISTEN_PORT = 3022
SSH_PORT = {{.pod/oprep/port/gitssh/host_port}}
SSH_ROOT_PATH = /home/action/.ssh
[database]
DB_TYPE = sqlite3
; DB_TYPE = mysql
; HOST = {{.pod/oprep/port/mysql/lan_addr}}:{{.pod/oprep/port/mysql/host_port}}
; NAME = dbaction
; USER = dbuser
; PASSWD = {{.cfg/sysinner-mysql/db_auth}}
LOG_SQL = false
[security]
INSTALL_LOCK = true
LOGIN_REMEMBER_DAYS = 30
[oauth2]
ENABLED = false
[time]
DEFAULT_UI_LOCATION = Asia/Shanghai
[log]
MODE = file
LEVEL = Info
DISABLE_ROUTER_LOG= true
[git]
MAX_GIT_DIFF_LINES = 2000
[service]
REQUIRE_SIGNIN_VIEW = true
ENABLE_CAPTCHA = true
DEFAULT_KEEP_EMAIL_PRIVATE = true
DISABLE_REGISTRATION = false
[repository]
ROOT = /opt/gitea/gitea/data/repos
[session]
PROVIDER = file
[picture]
DISABLE_GRAVATAR = true
[api]
ENABLE_SWAGGER = true
[i18n]
LANGS = en-US,zh-CN
NAMES = English,中文
[other]
SHOW_FOOTER_BRANDING = false
SHOW_FOOTER_VERSION = false
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false"""
[exp_res]
cpu_min = 2
mem_min = 256
vol_min = 5
[exp_deploy]
rep_min = 1
rep_max = 1
sys_state = 1
failover_time = 300
failover_num_max = 0
failover_rate_max = 0
network_mode = 1
[[urls]]
name = "gdoc"
url = "https://www.sysinner.cn/gdoc/view/app-guide/gitea/x1.md"