Open jashmehta3300 opened 1 year ago
@jashmehta3300 can you please assign me this issue
Hi @jashmehta3300 , Devansh here from DJ Unicode, could you pls assign the issue to me
Thank you @jashmehta3300 for assigning the issue to me Just wanted to clarify can we assume that the folders which require .env files will have .env.example prebuilt in it Since if .env needs to be built automatically on installation then the required env variables for respective folders must be known beforehand So can we proceed with a solution shown below .env.example → assuming each microservice will have an .env.example file with the variables defined that are required to run it.
Terminal → asking the user to provide values for the environment variables
.env → autocreated like this by extracting variables from .env.example
Could you please clarify if this is the right approach or something else is expected.
Hi @DevanshAshar. Thanks for the suggestion, I think this is the right approach.
However, the microservices do not have .env.example files with the variable names currently. It would be great if you could also add those files in the respective folders.
Lastly, for the second step (i.e. taking env values for the terminal), I think it would be better if we only ask for DB_URL and keep the other variables optional since they already have default values in the code.
Hey @jashmehta3300 have added .env.example files in respective folders and also have added code to auto-create .env with start cmd . Could you please review the PR
Problem Statement
Currently the run_loca.sh script (https://github.com/cisco-open/martian-bank-demo/blob/main/scripts/run_local.sh) does not create .env files, and they have to be created manually.
Proposed Solution
Create these files automatically during installation.