diff --git a/apps/web/src/pages/RadarWatchRebind.test.tsx b/apps/web/src/pages/RadarWatchRebind.test.tsx index 50a3156..3300a07 100644 --- a/apps/web/src/pages/RadarWatchRebind.test.tsx +++ b/apps/web/src/pages/RadarWatchRebind.test.tsx @@ -51,6 +51,12 @@ vi.mock("../data/DataContext", () => { return { product_id: "p1", state: "empty", pains: [], scenarios: [], audiences: [], exclusions: [], updated_at: 1 }; }, async suggestWatchTerms() { return []; }, + async getRadarSchedule() { + return { hours: [6], timezone: "Asia/Taipei" }; + }, + async saveRadarSchedule(hours: number[]) { + return { hours: [...hours].sort((a, b) => a - b), timezone: "Asia/Taipei" }; + }, }, }; return { useRepos: () => repos }; diff --git a/deploy/prod/README.md b/deploy/prod/README.md index 652cb18..d1c1244 100644 --- a/deploy/prod/README.md +++ b/deploy/prod/README.md @@ -1,6 +1,6 @@ # Harbor Desk Production Deployment -This deployment targets Ubuntu amd64 at `daniel@10.0.0.33` and serves +This deployment targets Ubuntu amd64 at `daniel@10.0.0.9` and serves `threads-tool.30cm.net`. ## Layout @@ -29,7 +29,7 @@ only for the validated activate, rollback, and status scripts. Edit external provider credentials after bootstrap: ```bash -ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.33 +ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.9 sudoedit /etc/harbor/harbor.env ``` @@ -113,14 +113,14 @@ sudo /opt/harbor/deploy/remote/enable-tls.sh ``` Ensure Cloudflare Tunnel, router forwarding, or split DNS sends origin traffic -to `10.0.0.33`. A public Cloudflare DNS record alone cannot reach a private IP. +to `10.0.0.9`. A public Cloudflare DNS record alone cannot reach a private IP. ## Monitoring All monitoring ports bind to localhost. Open Grafana through an SSH tunnel: ```bash -ssh -i ~/.ssh/harbor_deploy -L 3000:127.0.0.1:3000 daniel@10.0.0.33 +ssh -i ~/.ssh/harbor_deploy -L 3000:127.0.0.1:3000 daniel@10.0.0.9 ``` Then browse `http://127.0.0.1:3000`. The generated Grafana password is in @@ -129,9 +129,9 @@ Then browse `http://127.0.0.1:3000`. The generated Grafana password is in Useful commands: ```bash -ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.33 \ +ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.9 \ sudo /opt/harbor/deploy/remote/status.sh -ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.33 \ +ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.9 \ journalctl -u 'harbor-gateway@*' -f ``` @@ -162,8 +162,8 @@ by default but is a no-op until you set `RESTIC_REPOSITORY` and configured, verify with: ```bash -ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.33 \ +ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.9 \ sudo systemctl start harbor-offsite-backup.service -ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.33 \ +ssh -i ~/.ssh/harbor_deploy daniel@10.0.0.9 \ sudo journalctl -u harbor-offsite-backup.service -n 50 ``` diff --git a/deploy/prod/bootstrap-server.sh b/deploy/prod/bootstrap-server.sh index 1d18ca5..d86fa1f 100755 --- a/deploy/prod/bootstrap-server.sh +++ b/deploy/prod/bootstrap-server.sh @@ -2,7 +2,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -TARGET=${DEPLOY_TARGET:-daniel@10.0.0.33} +TARGET=${DEPLOY_TARGET:-daniel@10.0.0.9} SSH_KEY=${DEPLOY_SSH_KEY:-$HOME/.ssh/harbor_deploy} REMOTE_STAGE=/tmp/harbor-prod-bootstrap ssh_opts=(-i "$SSH_KEY" -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes) diff --git a/deploy/prod/nginx/harbor-http.conf b/deploy/prod/nginx/harbor-http.conf index 7716506..1cebc19 100644 --- a/deploy/prod/nginx/harbor-http.conf +++ b/deploy/prod/nginx/harbor-http.conf @@ -11,7 +11,7 @@ upstream harbor_minio { server { listen 80; listen [::]:80; - server_name threads-tool.30cm.net 10.0.0.33; + server_name threads-tool.30cm.net 10.0.0.9; root /opt/harbor/current/web; index index.html; diff --git a/deploy/prod/release.sh b/deploy/prod/release.sh index d6ce7ae..cf9bd78 100755 --- a/deploy/prod/release.sh +++ b/deploy/prod/release.sh @@ -2,7 +2,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -TARGET=${DEPLOY_TARGET:-daniel@10.0.0.33} +TARGET=${DEPLOY_TARGET:-daniel@10.0.0.9} SSH_KEY=${DEPLOY_SSH_KEY:-$HOME/.ssh/harbor_deploy} artifact=${1:-} diff --git a/deploy/prod/reset-data.sh b/deploy/prod/reset-data.sh index 22bc7fb..8108a9e 100755 --- a/deploy/prod/reset-data.sh +++ b/deploy/prod/reset-data.sh @@ -2,7 +2,7 @@ set -euo pipefail SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -TARGET=${DEPLOY_TARGET:-daniel@10.0.0.33} +TARGET=${DEPLOY_TARGET:-daniel@10.0.0.9} SSH_KEY=${DEPLOY_SSH_KEY:-$HOME/.ssh/harbor_deploy} ssh_opts=(-i "$SSH_KEY" -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes) diff --git a/deploy/prod/rollback.sh b/deploy/prod/rollback.sh index 9ff9b98..d75dcdc 100755 --- a/deploy/prod/rollback.sh +++ b/deploy/prod/rollback.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -TARGET=${DEPLOY_TARGET:-daniel@10.0.0.33} +TARGET=${DEPLOY_TARGET:-daniel@10.0.0.9} SSH_KEY=${DEPLOY_SSH_KEY:-$HOME/.ssh/harbor_deploy} ssh -i "$SSH_KEY" -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes "$TARGET" sudo /opt/harbor/deploy/remote/rollback.sh