I am new to Dancer, but I am trying to configure it to work in a Docker container. As a result, I need to select my database settings from the environment.
In my case, I have DB_PORT_3306_TCP_ADDR , and DB_PORT_3306_TCP_PORT is Docker. Unfortunately, the Dancer::Plugin::Database module is a bug before I can modify the database to use these variables.
use Dancer ':syntax'; use Dancer::Plugin::Database; if ($ENV{DB_PORT_3306_TCP}) {
So the question is, is there a good way to configure Dancer from environment variables and not through static YAML?
source share