Skip to content

Commit 782ae3c

Browse files
committed
chore(deploy): source .env by default
Load environment variables from .env (or ENV_FILE) so deploy.sh runs without manual exports, and align .env.example with required variables.
1 parent 3633cea commit 782ae3c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# GitHub App Configuration (required)
22
GITHUB_APP_ID=
3-
GITHUB_PRIVATE_KEY= # Inline PEM, file path (absolute or ./relative), or base64-encoded
3+
GITHUB_PRIVATE_KEY_BASE64= # base64 -w0 < private-key.pem
44
GITHUB_WEBHOOK_SECRET=
55

6+
# Claude Code (required)
7+
CLAUDE_CODE_OAUTH_TOKEN=
8+
69
# Server Configuration (optional)
710
PORT=3000
811
LOG_LEVEL=info # trace, debug, info, warn, error, fatal

deploy.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ set -euo pipefail
2222
# pass the base64-encoded value straight through as GITHUB_PRIVATE_KEY.
2323
###############################################################################
2424

25+
# -- Load .env (optional) ------------------------------------------------------
26+
# If you prefer not to export variables in your shell, create a local `.env`
27+
# file and run `./deploy.sh`. This script will source it automatically.
28+
ENV_FILE=${ENV_FILE:-.env}
29+
if [[ -f "$ENV_FILE" ]]; then
30+
# Export all variables defined in the file.
31+
set -a
32+
# shellcheck disable=SC1090
33+
source "$ENV_FILE"
34+
set +a
35+
fi
36+
2537
# -- Configuration (customize as needed) --------------------------------------
2638
RESOURCE_GROUP="rg-kodiai"
2739
LOCATION="eastus"

0 commit comments

Comments
 (0)