From 1c133c5e06f97ec6df8b45688a9903602d085028 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 5 Jun 2026 23:17:10 +0000 Subject: [PATCH] fix(deploy): seed .env.example into APP_DIR if missing The Start Docker stack step does `cd $APP_DIR && [ -f .env ] || cp .env.example .env` but never ensured .env.example existed in APP_DIR. The rsync in the Deploy step also doesn't copy it. The first deploy on a fresh host therefore failed with 'cp: cannot stat .env.example' before ever bringing up the stack. Fix: copy .env.example from the workspace into APP_DIR if it isn't already there, before the cd. --- .gitea/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 8ee8a39..2957e94 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -28,6 +28,8 @@ jobs: run: | APP_DIR=/home/tyler/route-commerce mkdir -p $APP_DIR + # Seed .env.example into APP_DIR if missing (it lives in the repo, not in APP_DIR) + [ -f $APP_DIR/.env.example ] || cp .env.example $APP_DIR/.env.example cd $APP_DIR [ -f .env ] || cp .env.example .env # Append production secrets to .env (overriding .env.example defaults)