diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-08 19:42:54 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-08 19:42:54 -0400 |
| commit | c98ff4b715a050cf9dd0458f1a8ba7394cdfbd81 (patch) | |
| tree | c71a49ce34d83bdb8bf15d0300d62f32827a8e84 | |
| parent | a52a2a89dfe92d7bed4a6446101657a288fd3bae (diff) | |
refactor
| -rw-r--r-- | config-joey.hs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/config-joey.hs b/config-joey.hs index baabd8cb..525f9d72 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -63,24 +63,20 @@ host _ = Nothing container :: HostName -> Docker.ContainerName -> Maybe (Docker.Container) container _parenthost name -- Simple web server, publishing the outside host's /var/www - | name == "webserver" = Just $ Docker.containerFrom - (image $ System (Debian Unstable) "amd64") + | name == "webserver" = Just $ standardContainer Stable "amd64" [ Docker.publish "8080:80" , Docker.volume "/var/www:/var/www" , Docker.inside $ props & Apt.serviceInstalledRunning "apache2" - & Apt.unattendedUpgrades ] -- My own openid provider. Uses php, so containerized for security -- and administrative sanity. - | name == "openid-provider" = Just $ Docker.containerFrom - (image $ System (Debian Stable) "amd64") + | name == "openid-provider" = Just $ standardContainer Stable "amd64" [ Docker.publish "8081:80" , Docker.inside $ props - & Apt.stdSourcesList Stable - & Apt.unattendedUpgrades - & OpenId.providerFor ["joey", "liw"] "openid.kitenet.net:8081" + & OpenId.providerFor ["joey", "liw"] + "openid.kitenet.net:8081" ] -- armel builder has a companion container that run amd64 and @@ -147,6 +143,15 @@ standardSystem suite customprops = Just $ -- Currently not enable due to #726375 endprops = [] -- [Apt.installed ["systemd-sysv"] `onChange` Reboot.now] +-- This is my standard container setup. +standardContainer :: DebianSuite -> Architecture -> [Docker.Containerized Property] -> Docker.Container +standardContainer suite arch ps = Docker.containerFrom + (image $ System (Debian suite) arch) $ + [ Docker.inside $ props + & Apt.stdSourcesList suite + & Apt.unattendedUpgrades + ] ++ ps + -- Clean up a system as installed by cloudatcost.com cleanCloudAtCost :: HostName -> Property cleanCloudAtCost hostname = propertyList "cloudatcost cleanup" |
