rewardenv / reward

Reward is a Swiss Army knife CLI utility for orchestrating Docker based development environments.
https://rewardenv.readthedocs.io
MIT License
89 stars 13 forks source link

Standardization of the environments with regard to naming, credentials and .env/webroot solution #61

Open moke13-dev opened 7 months ago

moke13-dev commented 7 months ago

Would it be possible to standardize the enviroments more in terms of defaults, e.g. naming of databases, credentials, and so on as well as the handling of the webroot and the .env files.

With regard to the defaults for the databases and other credentials, such as backend credentials via bootstapping, it would be easiest if the user and password are always "reward" or "rewardenv". In addition, the database names should correspond to the enviroment name (reward_env_name).

This would be uniform for all enviroments and would be easier to remember.

In addition, handling the enviroments with the webroot is unattractive because, depending on the enviroment type, sometimes the .env is contained in the actual project, sometimes it is outside the project or sometimes an .env contains both the application configuration and the reward configuration.

My suggestion would be to either rename the reward .env file to e.g. .env.reward or move it to the .reward directory in the project, so that the collision with the project .env files is avoided.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

janosmiko commented 6 months ago

Hi @moke13-dev ,

These suggestions are also more than welcome. When I started this project, I wanted to be fully compatible with Warden. The webroot solution is also something we inherited from Warden, I strongly agree with the changes you suggested. I was also thinking about it previously, I planned to add support for environment files in the following order:

  1. .reward/reward.yml (or something similar)
  2. .reward/.env
  3. .env

If the first or the second configuration file exists, then those could be used. If not, then go with the third one. This would keep backward compatibility with the already existing environments and also a step forward.

And I would also keep the webroot functionality as a fallback option, as I already saw projects where the git repo contained a web or src folder and the Magento code was placed in that directory.

I'm open to discussion

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.