refactor
This commit is contained in:
parent
a52a2a89df
commit
c98ff4b715
|
@ -63,24 +63,20 @@ host _ = Nothing
|
||||||
container :: HostName -> Docker.ContainerName -> Maybe (Docker.Container)
|
container :: HostName -> Docker.ContainerName -> Maybe (Docker.Container)
|
||||||
container _parenthost name
|
container _parenthost name
|
||||||
-- Simple web server, publishing the outside host's /var/www
|
-- Simple web server, publishing the outside host's /var/www
|
||||||
| name == "webserver" = Just $ Docker.containerFrom
|
| name == "webserver" = Just $ standardContainer Stable "amd64"
|
||||||
(image $ System (Debian Unstable) "amd64")
|
|
||||||
[ Docker.publish "8080:80"
|
[ Docker.publish "8080:80"
|
||||||
, Docker.volume "/var/www:/var/www"
|
, Docker.volume "/var/www:/var/www"
|
||||||
, Docker.inside $ props
|
, Docker.inside $ props
|
||||||
& Apt.serviceInstalledRunning "apache2"
|
& Apt.serviceInstalledRunning "apache2"
|
||||||
& Apt.unattendedUpgrades
|
|
||||||
]
|
]
|
||||||
|
|
||||||
-- My own openid provider. Uses php, so containerized for security
|
-- My own openid provider. Uses php, so containerized for security
|
||||||
-- and administrative sanity.
|
-- and administrative sanity.
|
||||||
| name == "openid-provider" = Just $ Docker.containerFrom
|
| name == "openid-provider" = Just $ standardContainer Stable "amd64"
|
||||||
(image $ System (Debian Stable) "amd64")
|
|
||||||
[ Docker.publish "8081:80"
|
[ Docker.publish "8081:80"
|
||||||
, Docker.inside $ props
|
, Docker.inside $ props
|
||||||
& Apt.stdSourcesList Stable
|
& OpenId.providerFor ["joey", "liw"]
|
||||||
& Apt.unattendedUpgrades
|
"openid.kitenet.net:8081"
|
||||||
& OpenId.providerFor ["joey", "liw"] "openid.kitenet.net:8081"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
-- armel builder has a companion container that run amd64 and
|
-- armel builder has a companion container that run amd64 and
|
||||||
|
@ -147,6 +143,15 @@ standardSystem suite customprops = Just $
|
||||||
-- Currently not enable due to #726375
|
-- Currently not enable due to #726375
|
||||||
endprops = [] -- [Apt.installed ["systemd-sysv"] `onChange` Reboot.now]
|
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
|
-- Clean up a system as installed by cloudatcost.com
|
||||||
cleanCloudAtCost :: HostName -> Property
|
cleanCloudAtCost :: HostName -> Property
|
||||||
cleanCloudAtCost hostname = propertyList "cloudatcost cleanup"
|
cleanCloudAtCost hostname = propertyList "cloudatcost cleanup"
|
||||||
|
|
Loading…
Reference in New Issue