Aller au contenu

Network

La section network definit comment l’application est exposee sur Internet.

network:
- name: app
services:
- name: web
port: 8080
path: /

Si network est omis, le deployer cree automatiquement un reseau par defaut a partir du port expose par l’image Docker.

ChampTypeDefautDescription
namestringrequisNom du reseau (utilise dans les noms de ressources)
isPublicbooleanfalseAcces public (pas de whitelist IP). Force false en non-prod.
hoststringHostname complet (utilise en prod). Ex: api.homeserve.fr
hostPrefixstringPrefixe DNS personnalise. Ex: www, api
fromToWWWbooleantrueActive la redirection www (www <-> non-www)
aliasesstring[][]Hostnames supplementaires
servicesobject[]Services backend (port, path)
whitelistRangeobject[][]Plages IP autorisees (en plus des IPs Homeserve globales)
seo4ajaxobjectConfiguration SEO4Ajax (pre-rendering pour bots)
corsobjectOverride CORS (voir CORS & Securite)
timeoutobjectOverride timeouts (voir Gateway API)
rateLimitobjectRate limiting par route
retryobjectPolitique de retry automatique
loadBalancerstringAlgorithme de load balancing
responseHeadersobjectManipulation des headers de reponse
requestHeadersobjectManipulation des headers de requete
urlRewriteobjectReecriture d’URL
urlRedirectsobject[][]Redirections d’URL (path)
dnsRedirectionsstring[][]Domaines rediriges vers ce reseau

Chaque reseau contient un ou plusieurs services backend :

network:
- name: app
services:
- name: web
port: 8080 # Port du container
path: / # Path prefix pour le routing
ChampTypeDefautDescription
namestringrequisNom du service
portinteger80Port du container (80-65534)
pathstring/Prefix de path pour le routing
# App privee (defaut) -- accessible uniquement depuis les IPs Homeserve
network:
- name: app
isPublic: false
# App publique -- accessible depuis Internet
network:
- name: app
isPublic: true

En non-prod, isPublic est toujours force a false.

network:
- name: app
whitelistRange:
- name: partenaire-x
cidrs:
- 203.0.113.0/24
- 198.51.100.42

Les CIDRs sont additionnes aux IPs Homeserve globales (chargees depuis Vault).

network:
- name: app
host: api.homeserve.fr # Utilise en prod
hostPrefix: api # Utilise en preview/staging
aliases:
- api.homeserve.be
  • Preview/Staging : {name}-{branch}.homeserve.io ou {hostPrefix}-{name}-{branch}.homeserve.io
  • Production : host directement

Pre-rendering pour les moteurs de recherche :

network:
- name: app
seo4ajax:
key: "votre-cle-api"
path: "/questions-frequentes" # Optionnel -- prefixe de path

Voir aussi : Toutes les proprietes | Gateway API | CORS & Securite