Skip to content

Commit

Permalink
Adding dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ben851 committed Oct 23, 2023
1 parent e7b803e commit e17cfaf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,15 @@ class Scratch(Production):
NOTIFY_ENVIRONMENT = "scratch"


class Dev(Production):
NOTIFY_ENVIRONMENT = "dev"


configs = {
"development": Development,
"test": Test,
"production": Production,
"staging": Staging,
"scratch": Scratch,
"dev": Dev,
}
2 changes: 1 addition & 1 deletion gunicorn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
bind = "0.0.0.0:{}".format(os.getenv("PORT"))
accesslog = "-"

on_aws = os.environ.get("NOTIFY_ENVIRONMENT", "") in ["production", "staging", "scratch"]
on_aws = os.environ.get("NOTIFY_ENVIRONMENT", "") in ["production", "staging", "scratch", "dev"]
if on_aws:
# To avoid load balancers reporting errors on shutdown instances, see AWS doc
# > We also recommend that you configure the idle timeout of your application
Expand Down
3 changes: 3 additions & 0 deletions newrelic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,7 @@ error_collector.ignore_errors = app.v2.errors:BadRequestError jsonschema.excepti
[newrelic:scratch]
# monitor_mode = false

[newrelic:dev]
# monitor_mode = false

# ---------------------------------------------------------------------------

0 comments on commit e17cfaf

Please sign in to comment.