diff --git a/Propellor/Property/OpenId.hs b/Propellor/Property/OpenId.hs index f744037..2a55ff3 100644 --- a/Propellor/Property/OpenId.hs +++ b/Propellor/Property/OpenId.hs @@ -6,13 +6,13 @@ import qualified Propellor.Property.Apt as Apt import Data.List -providerFor :: [UserName] -> HostName -> Property -providerFor users hostname = propertyList ("openid provider") $ +providerFor :: [UserName] -> String -> Property +providerFor users baseurl = propertyList ("openid provider") $ [ serviceRunning "apache2" `requires` Apt.installed ["apache2"] , Apt.installed ["simpleid"] `onChange` serviceRestarted "apache2" - , File.fileProperty ("simpleid host " ++ hostname) + , File.fileProperty ("simpleid host " ++ baseurl) (map setbaseurl) "/etc/simpleid/config.inc" ] ++ map identfile users where @@ -20,5 +20,5 @@ providerFor users hostname = propertyList ("openid provider") $ [ "/var/lib/simpleid/identities/", u, ".identity" ] setbaseurl l | "SIMPLEID_BASE_URL" `isInfixOf` l = - "define('SIMPLEID_BASE_URL', 'http://"++hostname++"/simpleid');" + "define('SIMPLEID_BASE_URL', 'http://"++baseurl++"/simpleid');" | otherwise = l diff --git a/config-joey.hs b/config-joey.hs index 8445f7c..879e8ba 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -81,7 +81,8 @@ container parenthost name , Docker.inside $ props & Apt.stdSourcesList Stable & Apt.unattendedUpgrades - & OpenId.providerFor ["joey", "liw"] parenthost + & OpenId.providerFor ["joey", "liw"] + (parenthost++":8081") ] -- armel builder has a companion container that run amd64 and