Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .env file to make configuration easier to manage, and to reduce overrides through commits #21

Open
3 of 4 tasks
idiom-bytes opened this issue Aug 9, 2023 · 2 comments
Labels
Type: Enhancement New feature or request

Comments

@idiom-bytes
Copy link
Member

idiom-bytes commented Aug 9, 2023

Problem:

  1. .env.dev is being changed due to commits and the url for staging server is being overriden with localhost
  2. Server endpoints are hard to follow and configure
  3. .env.dev uses a different structure than the rest of our respos. Instead, use .env.sample and .env

Standardize .env usage

Please use .env.sample to communicate possible configurations and .env for the configuration

.env.sample

### Choose a websocket backend URL
AWS_URL_PRODUCTION=http://ec2-16-170-204-1.eu-north-1.compute.amazonaws.com
AWS_URL_STAGING=http://ec2-16-170-204-2.eu-north-1.compute.amazonaws.com
AWS_URL_DEV=http://localhost

### Websocket url
AWS_URL=your_url

.env

### Websocket url
AWS_URL=your_url

DoD:

  • .env.sample and .env structure follows the remainder of our repos
  • .env.sample contains all possible URLs
  • .env contains final URL configuration
  • .env.sample explains the config intuitively
@idiom-bytes idiom-bytes added the Type: Enhancement New feature or request label Aug 9, 2023
@KatunaNorbert
Copy link
Member

I don't think we should call it AWS_URL because it's not just AWS, it could be any kind of URL.
If you run it locally you have to set it to barge or local HOST, so let's just name it HOST or URL.

@idiom-bytes
Copy link
Member Author

A lot of this has been updated, we're now using .env.sample and URLs have been updated.

However, the configuration for .env.sample could still be adjusted to be a bit more self-explanatory.
Example:
# If running as docker container and connecting to Barge set the host to '172.15.0.15' else localhost

How to fix:

# If running with remote barge, use: development.oceandao.org
# If running with local barge, use: localhost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants