Devographics / Devographics/Monorepo

Have explicit local, staging and production values in surveyadmin

Open
#285 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
178
Forks
55
Avg merge
1m
Merged PRs (30d)
2

Description

Exploring the API reload, and cache reload, I've noticed that the way env variables are handled is a tad inconsistent

Since surveyadmin differentiates local, staging, and production, we might want to set explicit values for each in our .env variable.

We can make "local" the default value when the target is not specified, in order to avoid accidental breakage of production.
So the result would be:
```
API_URL_PRODUCTION=XX
API_URL_STAGING=XX
API_URL=localhost:4030/graphql
# and same for Redis related variables
```
We can put the public values (API URL for instance) directly in .env.example so we don't have to setup too many values.

Then in each interface we may switch from one or another as we need too.

We could even have a global select in the app header?

Changes are easy but I haven't modified the current behaviour so it doesn't break local installs of surveyadmin.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with surveyadmin's .env.example and inspect the existing API and Redis environment-variable consumers, since no source files are named in the issue. Trace how the target environment is selected, then define done as explicit local, staging, and production values with local as the safe default and unchanged local installs.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, redis, typescript
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.