SkynetLabs / skynet-webportal

A webapp that makes Skynet accessible to web browsers.
https://siasky.net
Other
256 stars 55 forks source link

do not report from dc when env file does not exist #2206

Closed kwypchlo closed 2 years ago

kwypchlo commented 2 years ago

dc should not report error when .env does not exist (it just logs error, doesn't really break the script anyway), docker-compose will report on that and exit with proper error code

before

➜  skynet-webportal git:(master) ✗ ./dc down
grep: ./.env: No such file or directory
open /Users/karol/sia/skynet-webportal/.env: no such file or directory

after

➜  skynet-webportal git:(master) ✗ ./dc down
open /Users/karol/sia/skynet-webportal/.env: no such file or directory
ro-tex commented 2 years ago

Is that a good idea? I would definitely prefer it to alert me if that file is not there. If dc runs with default setup instead of the one I expect from it that can cause a bunch of problems.

kwypchlo commented 2 years ago

Is that a good idea? I would definitely prefer it to alert me if that file is not there. If dc runs with default setup instead of the one I expect from it that can cause a bunch of problems.

the error is thrown anyway, the stack will not start/stop since the services rely on the .env file (see the after error)

the only change is that grep in dc will not print the error, docker-compose (bottom of the file) will exit with code 14 and print the proper error