Skip to content

infra(redirect): workwell.os → twh.os 301 redirect container#61

Merged
Taleef7 merged 2 commits into
mainfrom
infra/workwell-redirect
Jun 8, 2026
Merged

infra(redirect): workwell.os → twh.os 301 redirect container#61
Taleef7 merged 2 commits into
mainfrom
infra/workwell-redirect

Conversation

@Taleef7
Copy link
Copy Markdown
Owner

@Taleef7 Taleef7 commented Jun 8, 2026

Summary

  • Adds infra/redirect/ with a minimal nginx:1.27-alpine image that issues a permanent 301 Moved Permanently from https://workwell.os.mieweb.org$request_urihttps://twh.os.mieweb.org$request_uri.
  • Adds .github/workflows/deploy-workwell-redirect-mieweb.ymlworkflow_dispatch-only, no new secrets (reuses LAUNCHPAD_API_URL/LAUNCHPAD_API_KEY), deploys to hostname workwell via the shared deploy-mieweb-container.sh script.
  • infra/redirect/README.md documents the two manual owner steps needed before first deploy.

Manual owner steps before running the workflow

  1. After first workflow run: Go to https://github.com/Taleef7/workwell/pkgs/container/workwell-redirect → Package settings → Change visibility → Public. MIE cluster pulls anonymously.
  2. Run workflow: GitHub Actions → "Deploy workwell.os redirect (MIEWeb)" → Run workflow. Use replace_existing: true if the workwell hostname already exists in the MIE manager UI.

Acceptance criteria

curl -I https://workwell.os.mieweb.org/
# HTTP/1.1 301 Moved Permanently
# Location: https://twh.os.mieweb.org/

Test plan

  • Build job pushes ghcr.io/taleef7/workwell-redirect:latest and :sha-<SHA> to GHCR
  • Deploy job completes with container status running at workwell.os.mieweb.org
  • curl -I https://workwell.os.mieweb.org/foo/bar returns 301 Location: https://twh.os.mieweb.org/foo/bar (path preserved)
  • No changes to the TWH deployment or any existing secrets

🤖 Generated with Claude Code

- infra/redirect/Dockerfile: nginx:1.27-alpine serving a single
  `return 301 https://twh.os.mieweb.org$request_uri` rule.
- infra/redirect/nginx.conf: the redirect server block.
- infra/redirect/README.md: first-time owner steps (make GHCR package
  public; run workflow_dispatch; verify with curl -I).
- .github/workflows/deploy-workwell-redirect-mieweb.yml:
  workflow_dispatch-only; builds ghcr.io/taleef7/workwell-redirect and
  deploys to hostname `workwell` via the shared deploy-mieweb-container.sh
  script. No new secrets needed beyond LAUNCHPAD_API_URL/KEY.

Acceptance: curl -I https://workwell.os.mieweb.org/ → 301 Location:
https://twh.os.mieweb.org/ (after owner makes package public + runs workflow).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workwell-measure-studio Ready Ready Preview, Comment Jun 8, 2026 5:04pm

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e38b699ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread infra/redirect/README.md Outdated
Comment on lines +31 to +32
`deploy-redirect` job in the workflow with `REDIRECT_HOSTNAME: workwell-api`
and the same image. The nginx config redirects all paths unconditionally.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't reuse the frontend redirect image for API

If an operator follows this optional step for workwell-api.os.mieweb.org, the reused image is hardcoded in infra/redirect/nginx.conf to redirect every request to https://twh.os.mieweb.org, so API paths such as /api/auth/login would be sent to the frontend host instead of https://twh-api.os.mieweb.org; direct clients using the old API hostname would fail rather than reach the replacement API.

Useful? React with 👍 / 👎.

Step 4 suggested reusing the same nginx image for workwell-api.os, but
nginx.conf hardcodes https://twh.os.mieweb.org, so API paths would land
on the frontend rather than twh-api. Removed the suggestion entirely;
a proper API-hostname redirect would need a separate nginx conf.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Taleef7 Taleef7 self-assigned this Jun 8, 2026
@Taleef7 Taleef7 merged commit a2f1c82 into main Jun 8, 2026
20 checks passed
@Taleef7 Taleef7 deleted the infra/workwell-redirect branch June 8, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant