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

Need bool Method to show whether project is Staging vs. Production #10

Open
3 tasks
jeremy-farrance opened this issue Jul 28, 2024 · 0 comments
Open
3 tasks

Comments

@jeremy-farrance
Copy link
Owner

Adding to the list of helpful Booleans (IsDebug, IsSuper, IsAccuratyIp, IsUrlSpecial(), etc.), we need a reasonably reliable way to determine if the project is running in production vs. staging. Production basically means its either released and live, and in front of the public (client for Intranet). Staging would mean we are working on it and/or this version of the project is a clone or something; running locally or from a non-production URL.

Method name: IsStaging() // TBD?

For convenience, IsProduction() => !IsStaging() ??

To solve this we return true on the follow conditions (WIP):

  • is the current site running on an Accuraty-based subdomain? List below.
  • is the current site HttpContext.Current.Request.IsLocal
  • more WIP

Exception Handling: What if a site/project actually is staging, but doesn't match a list item above?

How would we handle this custom? What site settings could set that is easy to discover and implement (and detect) so that a project could be true for IsStaging()? This could or should also work to temporarily flip a production site to staging if/when needed (seems like a likely need). For this latter case, maybe we implement this with a Duration? E.g. flip to staging for 4 hours.

Accuraty staging domains for project deployments:

  • ACCURATY.US
  • ACCURATY.WS
  • ACCURATY.???
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

No branches or pull requests

1 participant