2018-10-30 14:50:33 +01:00
|
|
|
---
|
|
|
|
%set dmode = %%getVar('gitea_db_mode','non')
|
|
|
|
%if %%dmode == "externe"
|
|
|
|
dbhost: %%gitea_dbserver
|
|
|
|
dbport: %%gitea_dbport
|
|
|
|
dbroot: %%gitea_dbuser
|
|
|
|
dbrootpwd: %%gitea_dbpass
|
|
|
|
%else if %%dmode == "local"
|
|
|
|
dbhost: 127.0.0.1
|
|
|
|
%end if
|
|
|
|
dbtype: mysql
|
|
|
|
dbname: gitea
|
|
|
|
dbuser: gitea
|
|
|
|
dbpass: "changeme"
|
|
|
|
%set allow_hosts = %%getVar('gitea_allow_hosts', '')
|
|
|
|
%if %%dmode == "local"
|
|
|
|
client_hosts: ["127.0.0.1", "localhost" %slurp
|
|
|
|
%else if %%dmode == "externe"
|
|
|
|
client_hosts: ["%%adresse_ip_eth0" %slurp
|
|
|
|
%end if
|
|
|
|
%if %%dmode != "default"
|
|
|
|
%if %%is_empty(%%allow_hosts)
|
|
|
|
]
|
|
|
|
%else
|
|
|
|
%for %%hst in %%allow_hosts
|
|
|
|
,"%%hst" %slurp
|
|
|
|
%end for
|
|
|
|
]
|
|
|
|
%end if
|
|
|
|
%end if
|
|
|
|
createscript: "/usr/share/eole/db/gitea/gen/00-create-gitea-db.sql"
|
|
|
|
#updatescripts: ["/usr/share/eole/db/gitea/updates/gitea-update-1.sql"]
|
|
|
|
|
|
|
|
%set cnt_prefix = %%getVar('container_path_reseau', '')
|
|
|
|
pwd_files:
|
|
|
|
- {file: '%%cnt_prefix/etc/gitea/conf/app.ini',
|
2019-09-29 10:08:53 +02:00
|
|
|
pattern: 'PASSWD = `',
|
|
|
|
end_pattern: '`',
|
2018-10-30 16:32:58 +01:00
|
|
|
owner: 'root:gitservice',
|
2018-10-30 14:50:33 +01:00
|
|
|
mod: '660' }
|