element-hq / element-hq/element-web
Allow a template with environment variables to be used for the element web config
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Your use case
#### What would you like to do?
Configure the `config.json` with environment variables and let the docker entrypoint handle the substitution.
#### Why would you like to do it?
To simplify deployments on multiple environments.
#### How would you like to achieve it?
A new script, let's call it `17-generate-config.sh` can substitute the variables. It can be as simple as:
```shell
#!/bin/sh
set -e
envsubst < /app/config.json.template > /app/config.json
```
### Have you considered any alternatives?
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Locate the Docker entrypoint and the existing config.json handling, then review how a proposed 17-generate-config.sh step could process config.json.template. Done means deployments can provide environment variables, generate config.json during container startup, and retain the existing configuration behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100