Le dorsal confie chaque application cliente au role de son environnement (app_python, app_statique) ; le controleur lit son depot a la forge du site (scripts/app_source.py) et le depose au commit exact. Une sonde app-<application> par application remplace apps-servies et sites-servis. Une application cliente ne nomme plus son dorsal (instancier, P67). En production chez Chezlepro : monregistraire (nom interne, par l'edge) et le site web de Chezlepro (offre.chezlepro.ca, par le web frontal). serveur_powerdns vide le cache de l'Unbound colocalise quand une zone a bouge, ou quand son empreinte _plancher differe de celle de l'autoritatif. Pas 5 (applications-clientes.md 7) : make applications-porter, et make publier apres le genome, portent le depot de chaque application a la forge du site qui heberge la releve, prive, en avance rapide seulement. Pose vers TechnoLibre. Le runner lit aussi les depots de ses applications (forge_cles, forge_etancheite). CHANGELOG 259 a 265. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.4 KiB
Django/Jinja
30 lines
1.4 KiB
Django/Jinja
# Application {{ app_python_application.nom }} — unite generee par Set-OPS (role app_python). Ne pas editer.
|
|
# Source : {{ app_python_application.source }} a {{ app_python_application.version }} ({{ app_python_application.commit }})
|
|
[Unit]
|
|
Description=Application {{ app_python_application.nom }} ({{ app_python_application.noms | join(' ') }})
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ app_python_utilisateur }}
|
|
Group={{ app_python_utilisateur }}
|
|
WorkingDirectory={{ app_python_application.dossier }}
|
|
Environment="PATH={{ (app_python_venv ~ '/bin:') if (app_python_livrees | bool) else '' }}/usr/bin:/bin"
|
|
Environment=PYTHONDONTWRITEBYTECODE=1
|
|
{% if app_python_contrat.secrets | default([]) | length > 0 %}
|
|
EnvironmentFile={{ app_python_secrets_racine }}/{{ app_python_application.nom }}.env
|
|
{% endif %}
|
|
{% if app_python_dossier_etat | length > 0 %}
|
|
# L'etat vit hors du code ; il apparait a l'application la ou son contrat le place.
|
|
BindPaths={{ app_python_etat_racine }}/{{ app_python_application.nom }}:{{ app_python_application.dossier }}/{{ app_python_dossier_etat }}
|
|
{% endif %}
|
|
# `env` cherche la commande dans le PATH ci-dessus : le python des roues livrees, sinon Debian.
|
|
ExecStart=/usr/bin/env {{ app_python_contrat.demarrer | replace('{port}', app_python_application.port | string) | replace('%', '%%') }}
|
|
Restart=on-failure
|
|
RestartSec=3
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectHome=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|