Aller au contenu

Quick Start

  • Un repo GitHub dans l’organisation HomeserveFR
  • Un workflow GitHub Actions avec le deployer reusable
  • Un fichier deployer.yaml a la racine du projet
name: mon-api
namespace: mon-api
vaultSecretsPath: secret/platform/apps/mon-namespace/mon-api
databases:
pgs:
- name: mon_api
features:
- redis
migration:
enable: true
useAppImg: true
command: ["npm", "run", "migrate"]
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
environmentVariables:
- name: DATABASE_URL
value: "postgresql://$(PG_USER_MON_API):$(PG_PASS_MON_API)@$(PG_HOST_MON_API)/$(PG_DBNAME_MON_API)"
- name: REDIS_URL
value: "vault:secret/platform/redis#redis1_url"

Le deployer :

  • Detecte le port expose par l’image Docker
  • Cree un service ClusterIP
  • Configure le DNS (mon-api-{branch}.homeserve.io)
  • Genere les certificats TLS
  • Configure l’Envoy Gateway avec CORS, timeouts, retries
.github/workflows/ci.yaml
name: CI
on:
push:
workflow_dispatch:
jobs:
ci:
uses: HomeserveFR/devops-workflows/.github/workflows/deployer-reusable.yml@v2
with:
command: 'deployer deploy'
environment: staging
environment_github: staging
branch_slug: ${{ github.ref_name }}
docker_image: 'mon-registry/mon-image:latest'
secrets: inherit
Fenêtre de terminal
git add deployer.yaml .github/workflows/ci.yaml
git commit -m "feat: add deployer configuration"
git push

Le pipeline va automatiquement deployer l’application. L’URL sera disponible dans les logs du job deploy.