Shared Nginx reverse proxy deployment for Makepad-fr applications.
This repository owns the shared proxy stack for application VMs. Application repositories should not deploy Nginx directly. They should only attach their services to the shared application overlay network created or managed by this repository.
compose.yml: base Nginx service definitionsites/catwlk-*.conf.template: Catwlk virtual host templatessites/alerteconso-prod.conf.template: Alerte Conso virtual host templatesites/le-petit-coin-prod.conf.template: au petit coin backend virtual host templateenvs/production/compose.yml: production Swarm overridesenvs/production/.env.proxy: production proxy settings
The proxy joins shared external overlay networks:
${MAKEPAD_PROXY_PROD_APP_NETWORK}${MAKEPAD_PROXY_CANARY_APP_NETWORK}${MAKEPAD_PROXY_ALERTECONSO_APP_NETWORK}${MAKEPAD_PROXY_LE_PETIT_COIN_APP_NETWORK}
Each application stack attaches to its corresponding shared network and exposes a stable DNS alias there. aupetitcoin.makepad.fr proxies to LE_PETIT_COIN_PROD_UPSTREAM, which defaults to http://le-petit-coin-backend:8080 to match the backend stack's production LE_PETIT_COIN_BACKEND_ALIAS.
Pin the shared proxy to proxy-capable nodes:
docker node update --label-add infra.makepad.proxy=true <proxy-node>The deploy workflow runs automatically on pushes to main that change the proxy Compose files, production environment, site templates, or the deploy workflow itself. It can also be run manually from GitHub Actions.
Required environment secrets:
DEPLOY_SSH_HOSTDEPLOY_SSH_PORTDEPLOY_SSH_USERDEPLOY_SSH_PRIVATE_KEYDEPLOY_REMOTE_DIRDEPLOY_STACK_NAMEMAKEPAD_PROXY_PROD_APP_NETWORKMAKEPAD_PROXY_CANARY_APP_NETWORKMAKEPAD_PROXY_ALERTECONSO_APP_NETWORKMAKEPAD_PROXY_LE_PETIT_COIN_APP_NETWORK
The workflow deploys only the proxy stack. If the shared application network does not exist yet, it is created on the manager before deployment.
Certificates must already exist on the proxy VM under /etc/letsencrypt, matching the paths configured in envs/<environment>/.env.proxy.
For aupetitcoin.makepad.fr, the production proxy expects:
/etc/letsencrypt/live/aupetitcoin.makepad.fr/fullchain.pem/etc/letsencrypt/live/aupetitcoin.makepad.fr/privkey.pem