Open riseandshaheen opened 2 months ago
Since .env
can be a valid file for the development environment, we could emit a WARNING
in the CLI, suggesting the user to rename the file or be careful with which variable are chosen.
Also, suggest using cartesi.env
to override rollups-node ENV variables.
I'm just thinking out loud here.
Why is there a .env
file there? Is it the one created by the deployment procedure? Can we generate one with a different name?
Why is there a
.env
file there? Is it the one created by the deployment procedure? Can we generate one with a different name?
Yes, we could save with da difffent name.
But there are some language frameworks that use dotenv.
๐ Expected behavior
When you deploy a Cartesi app on a cloud provider, you have a
.env
file for node configuration in the app directory. After deployment, if you switch back to local development and run the node, the CLI should ignore the.env
file and the Node should run smoothly as it did before deployment.๐ซ Actual behavior
When you spin up the node with
cartesi run
, the Cartesi CLI reads the node env variables from.env
and overrides the default values. This creates a timeout issue for local node as shown below:๐งช Minimal test case
Steps to reproduce:
๐ Environment
Local Dev environment - Mac M1 Pro Cartesi CLI version 0.15.1
โ๏ธ Possible solutions
Currently, quick fix is to simply rename
.env
file when you're running node in locally.