---
name: render-deployment-manager
description: Manage Render.com deployments for this repository using the built-in admin endpoints, ConfigService, and the active Render environment variables.
title: render-deployment-manager
canonical_url: https://skilld.dev/gh/ki2pixel/render_signal_server/render-deployment-manager
last_updated: 2026-10-08T16:19:03.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install ki2pixel/render_signal_server/render-deployment-manager`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/render-deployment-manager`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ki2pixel/render_signal_server/render-deployment-manager) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/render-deployment-manager`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/render-deployment-manager --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/render-deployment-manager --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Render Deployment Manager

## Objectif
Orchestrer les déploiements Render de `render_signal_server` en s'appuyant d'abord sur les primitives réellement présentes dans ce dépôt : `routes/api_admin.py`, `ConfigService` et les variables `RENDER_*`.

## Quand utiliser ce skill
- Vérification de la configuration Render exposée par `ConfigService.get_render_config()`
- Déclenchement d'un déploiement via `POST /api/deploy_application`
- Redémarrage applicatif via `POST /api/restart_server`
- Diagnostic des problèmes de déploiement ou de hook Render
- Vérification des variables d'environnement `RENDER_*`

## Pré-requis
- Variables `RENDER_API_KEY` + `RENDER_SERVICE_ID` si vous passez par l'API Render
- ou `RENDER_DEPLOY_HOOK_URL` si vous passez par le Deploy Hook
- Connaissance des fallbacks locaux `DEPLOY_CMD` et `RESTART_CMD`
- Accès authentifié au dashboard admin si vous utilisez les endpoints Flask

## Workflow de déploiement
1. **Valider la configuration active**
   - Inspecter `ConfigService.get_render_config()` ou les variables `RENDER_API_KEY`, `RENDER_SERVICE_ID`, `RENDER_DEPLOY_HOOK_URL`, `RENDER_DEPLOY_CLEAR_CACHE`.
   - Vérifier si le déploiement doit passer par hook, API Render ou fallback local.
2. **Déclencher le déploiement applicatif**
   - Utiliser `POST /api/deploy_application` pour laisser `routes/api_admin.py` choisir automatiquement la meilleure stratégie (Deploy Hook, API Render, puis fallback local).
3. **Redémarrer si nécessaire**
   - Utiliser `POST /api/restart_server` pour forcer un redémarrage applicatif lorsque le besoin n'est pas un déploiement complet.
4. **Suivre l'état**
   - Contrôler le retour JSON des endpoints admin (`success`, `message`, `deploy_id`, `status`).
   - Vérifier ensuite `/health` et les logs Render / applicatifs.
5. **Diagnostiquer les erreurs**
   - Vérifier les valeurs `RENDER_*`, les hooks invalident, puis les commandes `DEPLOY_CMD` / `RESTART_CMD` si le fallback local est utilisé.

## Points d'entrée réels du dépôt
- `routes/api_admin.py` : endpoints `/api/deploy_application` et `/api/restart_server`
- `services/config_service.py` : `get_render_config()` et `has_render_config()`
- `config/settings.py` : variables `RENDER_API_KEY`, `RENDER_SERVICE_ID`, `RENDER_DEPLOY_HOOK_URL`, `RENDER_DEPLOY_CLEAR_CACHE`

## Exemples d'usage courants
### Déclencher un déploiement via l'API admin
```bash
curl -X POST http://localhost:5000/api/deploy_application \
  -H 'Content-Type: application/json' \
  -b '<session-authentifiée>'
```

### Vérifier la configuration Render côté Python
```bash
python - <<'PY'
from services.config_service import ConfigService
print(ConfigService().get_render_config())
PY
```

## Ressources
- Documentation Render.com pour les hooks et l'API REST
- `routes/api_admin.py` pour la logique de déploiement effective de ce projet

## Bonnes pratiques
- Toujours vérifier les variables `RENDER_*` avant un déploiement
- Préférer `/api/deploy_application` pour rester aligné avec la logique métier du dépôt
- Monitorer `/health` et les logs après déclenchement
- Garder l'historique des déploiements pour rollback si nécessaire
- Ne pas exposer les clés API ou secrets dans les logs
