Problem
Fresh deploy via docker compose --profile app up -d (image ghcr.io/deeplethe/utopia:0.1.0-rc5) exits immediately with:
Error: error with configuration: relative URL without a base
Root cause
docker-compose.yml sets:
UTOPIA_MIGRATION_URL: ${UTOPIA_MIGRATION_URL:-}
When the variable is unset, Compose passes an empty string into the container. Figment's Env::prefixed("UTOPIA_") deserializes that as Some("") instead of None, so AppConfig::migration_url() (self.migration_url.as_deref().unwrap_or(&self.database_url)) returns "" and the fallback to database_url never fires. sqlx then fails parsing the empty URL.
Verified: setting UTOPIA_MIGRATION_URL explicitly to the same value as UTOPIA_DATABASE_URL makes the app start normally (HTTP 200, migrations run).
Suggested fix
Treat empty as unset, e.g. in migration_url():
self.migration_url.as_deref().filter(|s| !s.trim().is_empty()).unwrap_or(&self.database_url)
(same pattern already used for secret_key empty-string handling in main.rs), or drop the always-empty env line from docker-compose.yml.
Problem
Fresh deploy via
docker compose --profile app up -d(imageghcr.io/deeplethe/utopia:0.1.0-rc5) exits immediately with:Root cause
docker-compose.ymlsets:When the variable is unset, Compose passes an empty string into the container. Figment's
Env::prefixed("UTOPIA_")deserializes that asSome("")instead ofNone, soAppConfig::migration_url()(self.migration_url.as_deref().unwrap_or(&self.database_url)) returns""and the fallback todatabase_urlnever fires. sqlx then fails parsing the empty URL.Verified: setting
UTOPIA_MIGRATION_URLexplicitly to the same value asUTOPIA_DATABASE_URLmakes the app start normally (HTTP 200, migrations run).Suggested fix
Treat empty as unset, e.g. in
migration_url():(same pattern already used for
secret_keyempty-string handling inmain.rs), or drop the always-empty env line fromdocker-compose.yml.