Im trying to deploy my Phoenix Application with the help of a Dockerfile, however, where ever I put my COPY .env ., it’s always returning (in the logs) ** (File.Error) could not read file ".env": no such file or directory
My Dockerfile is in the same directory as the .env file = in the root directory of the project (no subfolders etc.)
@vKxni can you look through your code and find where your app is expecting the .env file? This appears to be where your error is coming from, not Dockerfile.
iex(4)> Dotenv.load(".env")
** (File.Error) could not read file ".env": no such file or directory
(elixir 1.13.2) lib/file.ex:355: File.read!/1
lib/dotenv.ex:218: Dotenv.read_env_file/1
lib/dotenv.ex:135: Dotenv.load/1
(File.Error) could not read file ".env": no such file or directory
2022-08-19T10:01:33Z [info] (elixir 1.13.2) lib/file.ex:355: File.read!/1
2022-08-19T10:01:33Z [info] (dotenv_parser 2.0.0) lib/dotenv_parser.ex:98: DotenvParser.load_file/1