Formulaire de génération d'une application Yunohost

{{ main_form.hidden_tag() }} {{ main_form.tutorial.label }} {{ main_form.tutorial() }} {# TODO : this doesn't work, should be changed on the fly. Is it worth the trouble ? {% if main_form.tutorial %} L'application générée contiendra des commentaires additionnels pour faciliter la compréhension {% else %} L'application générée ne contiendra que le minimum nécessaire {% endif %}
#}
En mode tutoriel, l'application générée contiendra des commentaires additionnels pour faciliter la compréhension. En version épurée, l'application générée ne contiendra que le minimum nécessaire.

L'application à empaquetter dans Yunohost

Cette partie sert à indiquer comment le logiciel est intégré à Yunohost.

{{ main_form.app_name.label }} {{ main_form.app_name()}}
{{ main_form.app_id.label}} {{ main_form.app_id() }} _ynh
{{ main_form.description_en.label}} {{ main_form.description_en(style="height: 2.5em;min-height: 2em; max-height: 4em;flex-grow: 1;box-sizing: border-box;")}}

{{ main_form.description_fr.label}} {{ main_form.description_fr(style=" height: 2.5em;min-height: 1em; max-height: 4em;flex-grow: 1;box-sizing: border-box;")}}

Intégration

Cette partie sert à indiquer comment le logiciel est intégré à Yunohost.


{{ main_form.version.label}} {{ main_form.version()}}
{{ main_form.maintainers.label}} {{ main_form.maintainers(style="width: 60%;")}}
{{ main_form.multi_instance.label}} {{ main_form.multi_instance()}}
{{ main_form.architectures.label}} {{ main_form.architectures()}}

{{ main_form.ldap.label}} {{ main_form.ldap()}}
{{ main_form.sso.label}} {{ main_form.sso()}}

Informations sur le logiciel

Cette partie donne des informations génériques sur le logiciel.


{{ main_form.license.label}} {{ main_form.license()}}
{{ main_form.website.label}} {{ main_form.website()}}
{{ main_form.demo.label}} {{ main_form.demo()}}
{{ main_form.admindoc.label}} {{ main_form.admindoc()}}
{{ main_form.userdoc.label}} {{ main_form.userdoc()}}
{{ main_form.code.label}} {{ main_form.code()}}

Paramétrage de l'application

Cette partie sert à indiquer comment configurer l'application côté Yunohost.

Dossier des données {{ main_form.data_dir.label}} {{ main_form.data_dir()}}
{{ main_form.data_subdirs.label}} {{ main_form.data_subdirs()}}
{{ main_form.supports_change_url.label}} {{ main_form.supports_change_url()}}
Paramètres de langue
{{ main_form.language.label}} {{ main_form.language()}}
{{ main_form.default_language.label}} {{ main_form.default_language()}}

{{ main_form.visibility.label}} {{ main_form.visibility()}}
{{ main_form.use_logrotate.label}} {{ main_form.use_logrotate()}}
{{ main_form.use_fail2ban.label}} {{ main_form.use_fail2ban(onchange="showForm(this, 'fail2ban')")}} {%- if parameters['use_fail2ban'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Configuration pour fail2ban {{ main_form.fail2ban_regex.label}} {{ main_form.fail2ban_regex(style="width:60%;")}}

{{ main_form.use_cron.label }} {{ main_form.use_cron(onchange="showForm(this, 'cron')") }} {%- if parameters['use_cron'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Configuration pour CRON {{ main_form.cron_config_file.label}} {{ main_form.cron_config_file()}}

Configuration pour le serveur NGINX {{ main_form.nginx_config_file.label }}
{{ main_form.nginx_config_file() }}

{{ main_form.use_systemd_service.label}} {{ main_form.use_systemd_service(onchange="showForm(this, 'SystemD')")}}
{%- if parameters['use_systemd_service'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Configuration pour le service SystemD {{ main_form.systemd_service_description.label }} {{ main_form.systemd_service_description() }}
{{ main_form.systemd_config_file.label }}
{{ main_form.systemd_config_file() }}

{{ main_form.use_custom_config_file.label}} {{ main_form.use_custom_config_file(onchange="showForm(this, 'custom_config')")}}
{%- if parameters['use_custom_config_file'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Fichier de configuration personnalisé {{ main_form.custom_config_file.label }} {{ main_form.custom_config_file() }}
{{ main_form.custom_config_file_content.label }}
{{ main_form.custom_config_file_content() }}

Questions à poser pendant l'installation

Cette partie sert à indiquer les questions qui devront être posées.
NB: seules des questions standard sont proposées ici, il faudra éventuellement compléter à la main en suivant le modèle des autres questions.

{{ main_form.use_whole_domain.label}} {{ main_form.use_whole_domain()}}

Source du logiciel et dépendances

{{ main_form.source_url.label}} {{ main_form.source_url()}}
{{ main_form.sha256sum.label}} {{ main_form.sha256sum()}}
{{ main_form.auto_update.label}} {{ main_form.auto_update()}}
{{ main_form.dependencies.label}} {{ main_form.dependencies(style="width:40%;")}}

{{ main_form.use_db.label }} {{ main_form.use_db() }}

Utilisation de PHP

{{ main_form.use_php.label}} {{ main_form.use_php(onchange="showForm(this, 'PHP')") }}
{%- if parameters['use_php'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Fichier de configuration pour PHP {{ main_form.php_config_file.label }} {{ main_form.php_config_file()}}
{{ main_form.php_config_file_content.label }} {{ main_form.php_config_file_content()}}

Utilisation de NodeJS

{{ main_form.use_nodejs.label}} {{ main_form.use_nodejs(onchange="showForm(this, 'NodeJS')") }}
{%- if parameters['use_nodejs'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Configuration pour NodeJS {{ main_form.use_nodejs_version.label}} {{ main_form.use_nodejs_version() }}
{{ main_form.use_nodejs_needs_yarn.label}} {{ main_form.use_nodejs_needs_yarn() }}

Utilisation de Python

{{ main_form.use_python.label}} {{ main_form.use_python(onchange="showForm(this, 'Python')") }}
{%- if parameters['use_python'] == True -%} {# Not shown by default, so we show it if needed #} {%- else -%} {%- endif -%}
Configuration pour Python {{ main_form.python_dependencies_type.label}} {{ main_form.python_dependencies_type(onchange="showForm(this, 'Python_dependencies')") }}
{%- if parameters['python_dependencies_type'] == 'requirements.txt' -%} {{ main_form.python_requirements.label}} {{ main_form.python_requirements() }} {%- else -%} {{ main_form.python_dependencies_list.label}} {{ main_form.python_dependencies_list() }} {%- endif -%}

{{ main_form.submit(class="btn btn-primary btn-sm btn-center") }} {% if parameters['invalid_form'] %}

Formulaire invalide, veuillez vérifier quel champ contient une erreur svp.

{% endif %}

{% if parameters['preview'] %} {# is defined #}
Afficher le code des fichiers principaux

Voici le code de l'application {{parameters['app.name']}}

Manifeste (manifest.toml)


{% set lines = template_manifest_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

Script d'installation (install)


{% set lines = template_install_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

Script de suppression (remove)


{% set lines = template_remove_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

Script de sauvegarde (backup)


{% set lines = template_backup_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

Script de restauration (restore)


{% set lines = template_restore_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

Script de mise à jour (upgrade)


{% set lines = template_upgrade_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

Script de configuration spéciale (config)


{% set lines = template_config_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

{%- if template_change_url_content -%}

Script de changement d'URL (change_url)


{% set lines = template_change_url_content.splitlines() %}
{% for line in lines %} {{ line }}
{% endfor %}

{% endif %} {%- if systemd_config_file -%}

Fichier de configuration du service SystemD (systemd.service)

            
            {{parameters['systemd_config_file']}}
            
        
{% endif %} {%- if nginx_config_file -%}

Fichier de configuration de NGINX (nginx.conf)

            
            {{parameters['nginx_config_file']}}
            
        
{% endif %} {%- if custom_config_file -%}

Fichier de configuration personnalisé ({{custom_config_file}})

            
            {{parameters['custom_config_file_content']}}
            
        
{% endif %} {%- if cron_config_file -%}

Fichier de configuration de tâche CRON (task.cron)

            
            {{parameters['cron_config_file']}}
            
        
{% endif %}

{% endif %}