Hello!
We have a cloud service used for B2B customers where we have several projects where we need more than just "Prod" (main) and "Preview" (branch). This is because we have need for developer testing environments as well as a specialized environment used by our sales department. It looks something like this:
Environment
Deployment
Env variables / KV
Description
Production
main
prod
Primary site. Used by customers
Demo
main (schedule: Saturdays@03.00)
prod
Used by the sales department
Dev
main
dev
Used to mirror prod, but with non-production data
QA
main
stage
Here we can point KV to a local path for SQLite usage to always start with the same data (?)
Preview
[branch]
dev
Created for every PR to preview changes
Right now, we must create three projects to set a domain, environment variables and a separate KV for each, but this feels very unnecessary as the deployments we create (files being uploaded) are the same and duplicated many times. For this feature to work, it would be necessary to register a domain for each "environment" and as well as environment variables and which KV instance to use (or share).
# Rough structure of data to configure in `dash.deno.com`:
environments:
prod:
name: Production
kv: prod
variables:
ANALYTICS: true
FLAG_FOO_ENABLED: false
domains:
- example.com
dev:
name: Development
kv: dev
variables:
ANALYTICS: false
FLAG_FOO_ENABLED: true
domains:
- dev.example.com
# ...
Possible solution
It's possible to add a new parameter to deployctl. Instead of passing --prod, it's possible to pass --env=prod or --env-name=dev, or via the action. Passing a comma separated list would deploy the same files to multiple environments, thus being able to reduce deployment files multiple times with different env config:
The deployctl instance would then use the variables/kv-instance/domain configured for each environment name when creating the deployment.
Additional context
I feel like doing this would help a lot with consolidating all the information in the Deno Deploy Dashboard. Right now we are using 6 projects for 3 Github repositories. So to view logs/analytics/KV would mean constantly swapping around between different projects. It also makes it more complicated to share KV data in a good manner.
🔍
Type of feedback
Feature request
Description
Hello! We have a cloud service used for B2B customers where we have several projects where we need more than just "Prod" (main) and "Preview" (branch). This is because we have need for developer testing environments as well as a specialized environment used by our sales department. It looks something like this:
main
main
(schedule: Saturdays@03.00)main
main
[branch]
Right now, we must create three projects to set a domain, environment variables and a separate KV for each, but this feels very unnecessary as the deployments we create (files being uploaded) are the same and duplicated many times. For this feature to work, it would be necessary to register a domain for each "environment" and as well as environment variables and which KV instance to use (or share).
Possible solution
It's possible to add a new parameter to
deployctl
. Instead of passing--prod
, it's possible to pass--env=prod
or--env-name=dev
, or via the action. Passing a comma separated list would deploy the same files to multiple environments, thus being able to reduce deployment files multiple times with different env config:The
deployctl
instance would then use the variables/kv-instance/domain configured for each environment name when creating the deployment.Additional context
I feel like doing this would help a lot with consolidating all the information in the Deno Deploy Dashboard. Right now we are using 6 projects for 3 Github repositories. So to view logs/analytics/KV would mean constantly swapping around between different projects. It also makes it more complicated to share KV data in a good manner.