From 5d302dce5cad3435105afa7c7d5c5e32338c917e Mon Sep 17 00:00:00 2001 From: Meghdad <61308304+MeghdadFadaee@users.noreply.github.com> Date: Thu, 23 Jul 2026 08:18:29 +0330 Subject: [PATCH] add restricted deploy sudo policy --- deploy/SERVER_DEPLOYMENT.md | 1 + deploy/sudoers/warehouse-allocation-deploy | 1 + 2 files changed, 2 insertions(+) create mode 100644 deploy/sudoers/warehouse-allocation-deploy diff --git a/deploy/SERVER_DEPLOYMENT.md b/deploy/SERVER_DEPLOYMENT.md index 4a629a5..60fe9b2 100644 --- a/deploy/SERVER_DEPLOYMENT.md +++ b/deploy/SERVER_DEPLOYMENT.md @@ -14,6 +14,7 @@ | Nginx upstream | `/etc/nginx/conf.d/10-warehouse-allocation-upstream.conf` | | Restricted account | `warehouse-deploy` | | Deployment program | `/usr/local/sbin/warehouse-allocation-deploy` | +| Sudo policy | `/etc/sudoers.d/warehouse-allocation-deploy` | Only one API slot receives traffic after a deployment. During cutover both slots run briefly, allowing Nginx to switch without an API interruption. Redis and its diff --git a/deploy/sudoers/warehouse-allocation-deploy b/deploy/sudoers/warehouse-allocation-deploy new file mode 100644 index 0000000..886c22d --- /dev/null +++ b/deploy/sudoers/warehouse-allocation-deploy @@ -0,0 +1 @@ +warehouse-deploy ALL=(root) NOPASSWD: /usr/local/sbin/warehouse-allocation-deploy