Enhance kan installation and build scripts with new environment variables for Trello integration and update instructions
This commit is contained in:
@@ -47,11 +47,11 @@ function update_script() {
|
||||
|
||||
msg_info "Building Application"
|
||||
cd /opt/kan
|
||||
export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true
|
||||
set -a && source /opt/kan/.env && set +a
|
||||
export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true CI=true
|
||||
$STD pnpm install
|
||||
$STD pnpm build --filter=@kan/web
|
||||
unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT
|
||||
unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT CI
|
||||
msg_ok "Built Application"
|
||||
|
||||
msg_info "Setting up Standalone"
|
||||
|
||||
@@ -30,8 +30,11 @@ AUTH_SECRET=$(openssl rand -base64 32)
|
||||
cat <<EOF >/opt/kan/.env
|
||||
NEXT_PUBLIC_BASE_URL=http://${LOCAL_IP}:3000
|
||||
BETTER_AUTH_SECRET=${AUTH_SECRET}
|
||||
BETTER_AUTH_TRUSTED_ORIGINS=http://${LOCAL_IP}:3000
|
||||
POSTGRES_URL=postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
||||
NEXT_PUBLIC_ALLOW_CREDENTIALS=true
|
||||
TRELLO_APP_API_KEY=
|
||||
TRELLO_APP_API_SECRET=
|
||||
HOSTNAME=0.0.0.0
|
||||
PORT=3000
|
||||
NODE_ENV=production
|
||||
@@ -41,7 +44,7 @@ msg_ok "Configured Application"
|
||||
msg_info "Building Application"
|
||||
cd /opt/kan
|
||||
source /opt/kan/.env
|
||||
export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true NEXT_PUBLIC_BASE_URL NEXT_PUBLIC_ALLOW_CREDENTIALS BETTER_AUTH_SECRET
|
||||
export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true NEXT_PUBLIC_BASE_URL BETTER_AUTH_TRUSTED_ORIGINS NEXT_PUBLIC_ALLOW_CREDENTIALS BETTER_AUTH_SECRET
|
||||
export CI=true
|
||||
$STD pnpm install
|
||||
$STD pnpm build --filter=@kan/web
|
||||
|
||||
@@ -37,8 +37,12 @@
|
||||
"type": "warning"
|
||||
},
|
||||
{
|
||||
"text": "Update NEXT_PUBLIC_BASE_URL in /opt/kan/.env if accessing from a different hostname.",
|
||||
"text": "Update NEXT_PUBLIC_BASE_URL and BETTER_AUTH_TRUSTED_ORIGINS in /opt/kan/.env if accessing from a different hostname or via reverse proxy. After changing, run: rm -rf /opt/kan/apps/web/.next /opt/kan/.turbo && cd /opt/kan && NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true pnpm build --filter=@kan/web && cp -r /opt/kan/apps/web/.next/static /opt/kan/apps/web/.next/standalone/apps/web/.next/ && cp -r /opt/kan/apps/web/public /opt/kan/apps/web/.next/standalone/apps/web/ && systemctl restart kan",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Trello integration requires TRELLO_APP_API_KEY and TRELLO_APP_API_SECRET in /opt/kan/.env. Create a Power-Up at https://trello.com/power-ups/admin to obtain these credentials, then rebuild (see above).",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user