eole-gitea/dicos/50_gogs.xml

109 lines
5.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<!-- Je suis un commentaire -->
<file filelist='gogs-nginx' name='/etc/nginx/sites-available/gogs' source='gogs.nginx' mkdir='True' rm='True'/>
<file filelist='gogs' name='/usr/share/eole/bastion/data/51-gogs-nat_rules' mkdir='True' rm='True' mode='0755'/>
<file filelist='gogs' name='/usr/share/eole/mysql/eole-gogs/gen/00-create-gogs-db.sql' mkdir='True' rm='True'/>
<service_access service='gogs_with_nginx'>
<port service_accesslist="gogs_with_nginx">443</port>
</service_access>
</files>
<containers>
<container name='forge' id='101'>
<package>apt-transport-https</package>
<!-- FIXME this have to be installed <package>gogs</package> -->
<file filelist='gogs' name='/etc/gogs/conf/app.ini' source='gogs.conf' mkdir='True' rm='True'/>
<!-- <service servicelist='xxxx'>nom-du-service-a-lancer-dans-le-conteneur</service> -->
<service servicelist='gogs'>gogs</service>
<service_access service='gogs_without_nginx'>
<port service_accesslist="gogs_without_nginx" port_type="SymLinkOption">git_http_port</port>
</service_access>
<service_access service='gogs_ssh'>
<tcpwrapper>sshd</tcpwrapper>
</service_access>
</container>
</containers>
<variables>
<family name='services'>
<variable name='activer_gogs' type='oui/non' description='Activer la forge Gogs'>
<value>non</value>
</variable>
</family>
<family name='forge'>
<variable name='gogs_name' type='string' description='Nom de la forge' mandatory='True'>
<value>Forge Numérique EOLE</value>
</variable>
<variable name='gogs_mail' type='oui/non' description="Activer l'envois de courriels">
<value>non</value>
</variable>
<variable name='gogs_mail_from' type='string' description="Adresse courriel a l'origine des messages de la forge"/>
<variable name='gogs_mail_auth' type='oui/non' description="Utiliser un compte pour le serveur smtp">
<value>non</value>
</variable>
<variable name='gogs_email_user' type='string' description="Nom de l'utilisateur SMTP"/>
<variable name='gogs_email_password' type='string' description="Mot de passe de l'utilisateur"/>
<variable name='gogs_web_name' type='string' description='Nom DNS de la forge' mandatory='True'/>
<variable name='git_root' type='string' description='Repertoire des dépôts git' mandatory='True'>
<value>/var/db/gogs/repo</value>
</variable>
<variable name='gogs_registration' type='oui/non' description="Les utilisateurs peuvent s'enregistrer">
<value>non</value>
</variable>
<variable name='git_http_port' type='string' description='Port HTTP pour la forge' mode='expert'>
<value>6000</value>
</variable>
<variable name='git_ssh_port' type='string' description='Port SSH pour la forge' mode='expert'>
<value>2222</value>
</variable>
<variable name='gogs_db_file' type='string' description='Fichier de base de données' mode='expert'>
<value>/var/db/gogs/gogs.db</value>
</variable>
<variable name='git_domain' type='string' description='Domaine git ... fixme ...' mode='expert'>
<value>localhost</value>
</variable>
<variable name='gogs_nginx' type='oui/non' hidden='True'/>
</family>
</variables>
<constraints>
<condition name='hidden_if_in' source='gogs_mail'>
<param>non</param>
<target type='variable'>gogs_mail_from</target>
</condition>
<condition name='disabled_if_in' source='activer_gogs'>
<param>non</param>
<target type='filelist'>gogs</target>
<target type='filelist'>gogs-nginx</target>
<target type='servicelist'>gogs</target>
<target type='family'>forge</target>
<target type='service_accesslist'>gogs_ssh</target>
</condition>
<condition name='disabled_if_in' source='gogs_mail_auth'>
<param>non</param>
<target type='variable'>gogs_email_user</target>
<target type='variable'>gogs_email_password</target>
</condition>
<fill name='calc_multi_condition' target='gogs_nginx'>
<param>oui</param>
<param name="operator">OR</param>
<param type="eole" name="condition_1" optional="True">activer_revprox</param>
<param name="condition_2">non</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
</fill>
<condition name='disabled_if_in' source='gogs_nginx'>
<param>non</param>
<target type='filelist'>gogs-nginx</target>
<target type='service_accesslist'>gogs_with_nginx</target>
</condition>
<condition name='disabled_if_in' source='gogs_nginx'>
<param>oui</param>
<target type='service_accesslist'>gogs_without_nginx</target>
</condition>
</constraints>
<help>
<variable name='activer_gogs'>Activer la forge gogs, gogs est une forge basée sur Git clone de github</variable>
</help>
</creole>