From 0011f4593a66366f60fd9b62ca198060da775ed4 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 7 Dec 2023 19:38:30 -0600 Subject: [PATCH] chore: add staging, distinct production env --- .gitignore | 3 ++- wrangler.toml | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2c3482c..4e5aebb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ dist node_modules .wrangler -.dev.vars +*.vars +!*.vars.example diff --git a/wrangler.toml b/wrangler.toml index ee5d940..ccd47e1 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -4,9 +4,16 @@ main = "./src/index.ts" compatibility_date = "2023-11-08" node_compat = true - workers_dev = false +vars = { ENVIRONMENT = "dev" } + +[env.staging] +route = "staging.houstonbot.dev" +vars = { ENVIRONMENT = "staging" } + +[env.production] routes = [{ pattern = "houstonbot.dev", custom_domain = true }] +vars = { ENVIRONMENT = "production" } # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables) # Note: Use secrets to store sensitive data.