Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom domain #5

Closed
kiootic opened this issue Nov 27, 2023 · 0 comments · Fixed by #6
Closed

Support custom domain #5

kiootic opened this issue Nov 27, 2023 · 0 comments · Fixed by #6
Assignees

Comments

@kiootic
Copy link
Collaborator

kiootic commented Nov 27, 2023

For single-site mode, custom domain is supported by usage of PAGESHIP_HOST_PATTERN config.

For unmanaged-sites mode, custom domain is specified in sites.toml. It should be validated to ensure no duplicated custom domain association is present.

For managed-sites mode, custom domain is specified in app section of pageship.toml.

  • We use a cooperative model for management of custom domain - we don't perform domain ownership verification.
  • Each app can configure multiple custom domains, each custom domain should correspond to exactly one site.
  • When configuration is updated and custom domain is changed, an internal domain associaion table is updated.
    • If the domain is already associated with an app, the domain association is not updated automatically. A warning would be shown, and manual activation is needed.
    • Releasing a domain association would not restore it for existing app, existing app need activate manually.
    • Pattern for site matching is not planned for now.
  • API & command is available to check the status of the custom domain association at the moment.
    • active/inactive/claimed by another app (with app ID)
  • API & command is available to re-activate the custom domain association.

Example flow:

  1. App A updates config with custom domain X
  2. Custom domain X is associated with app A.
  3. App B updates config with custom domain X.
  4. A warning is shown due to existing association.
  5. Custom domain X is still associated with app A.
  6. App B activates the custom domain association.
  7. Custom domain X is associated with app B.
  8. App A activates the custom domain association.
  9. Custom domain X is associated with app A.
  10. App A updates config with no custom domain.
  11. Custom domain X is inactive.
  12. App B activates the custom domain association.
  13. Custom domain X is associated with app B.
@kiootic kiootic self-assigned this Nov 27, 2023
@kiootic kiootic closed this as completed Dec 20, 2023
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 a pull request may close this issue.

1 participant