{% import "bootstrap/wtf.html" as wtf %} {% extends "bootstrap/base.html" %} {% block title %} YunoHost app generator {% endblock %} {% block styles %} {{super()}} {% endblock %} {% block content %}

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

{{ main_form.hidden_tag() }} {{ wtf.form_errors(main_form, hiddens="only") }} {{ wtf.form_field(main_form.generator_mode) }}

1/6 - Informations générales

{{ wtf.form_field(main_form.app_name) }} {{ wtf.form_field(main_form.app_id) }} {{ wtf.form_field(main_form.description_en) }} {{ wtf.form_field(main_form.description_fr) }}

2/6 - Informations sur l'upstream

Le terme upstream désigne le projet original qui maintient l'app

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

3/6 - Intégration dans YunoHost

{{ wtf.form_field(main_form.version) }} {{ wtf.form_field(main_form.maintainers) }} {{ wtf.form_field(main_form.multi_instance) }} {{ wtf.form_field(main_form.architectures) }} {{ wtf.form_field(main_form.ldap) }} {{ wtf.form_field(main_form.sso) }}

4/6 - 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.

{{ wtf.form_field(main_form.domain_and_path) }} {{ wtf.form_field(main_form.init_main_permission) }} {{ wtf.form_field(main_form.init_admin_permission) }} {{ wtf.form_field(main_form.language) }}

5/6 - Ressources à initialiser

Il s'agit d'éléments techniques configurés avant que le "vrai" script d'install de l'app ne soit lancé. Typiquement : créer un user système, télécharger les sources de l'app, initialiser le dossier d'install et de données, installer des dépendances avec apt, créer une base de donnée SQL, ...

Sources du logiciel

{{ wtf.form_field(main_form.source_url) }} {{ wtf.form_field(main_form.sha256sum) }} {{ wtf.form_field(main_form.auto_update) }}
{{ wtf.form_field(main_form.system_user) }} {{ wtf.form_field(main_form.install_dir) }} {{ wtf.form_field(main_form.data_dir) }} {{ wtf.form_field(main_form.apt_dependencies) }} {{ wtf.form_field(main_form.ports) }} {{ wtf.form_field(main_form.database) }}

6/6 - Options et technologies spécifiques (to be reworked)

{{ main_form.supports_change_url.label}} {{ main_form.supports_change_url()}}
{{ 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() }}

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 %}
{% endblock %}