summaryrefslogtreecommitdiff
path: root/config-joey.hs
diff options
context:
space:
mode:
authorJoey Hess2014-04-08 16:58:11 -0400
committerJoey Hess2014-04-08 16:58:11 -0400
commit0460a04474d2ea4f439708bb9f8ded24fba329ac (patch)
treea0e8e90937f2139d0829c540aeadf99ca47526c7 /config-joey.hs
parent2e6f7c1b5d04db4841cb748150f2a99dcfba5617 (diff)
propellor spin
Diffstat (limited to 'config-joey.hs')
-rw-r--r--config-joey.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/config-joey.hs b/config-joey.hs
index f2cc5e78..f38fc836 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -12,6 +12,7 @@ import qualified Propellor.Property.User as User
import qualified Propellor.Property.Hostname as Hostname
--import qualified Propellor.Property.Reboot as Reboot
import qualified Propellor.Property.Tor as Tor
+import qualified Propellor.Property.OpenId as OpenId
import qualified Propellor.Property.Docker as Docker
import qualified Propellor.Property.SiteSpecific.GitHome as GitHome
import qualified Propellor.Property.SiteSpecific.GitAnnexBuilder as GitAnnexBuilder
@@ -35,6 +36,7 @@ host hostname@"clam.kitenet.net" = standardSystem Unstable $ props
& Apt.installed ["git-annex", "mtr"]
& Tor.isBridge
& JoeySites.oldUseNetshellBox
+ & Docker.docked container hostname "openid-provider"
& Docker.configured
& Docker.garbageCollected
-- Orca is the main git-annex build box.
@@ -59,7 +61,8 @@ host _ = Nothing
-- | This is where Docker containers are set up. A container
-- can vary by hostname where it's used, or be the same everywhere.
container :: HostName -> Docker.ContainerName -> Maybe (Docker.Container)
-container _host name
+container _parenthost name
+ -- Simple web server, publishing the outside host's /var/www
| name == "webserver" = Just $ Docker.containerFrom
(image $ System (Debian Unstable) "amd64")
[ Docker.publish "8080:80"
@@ -68,6 +71,14 @@ container _host name
& serviceRunning "apache2"
`requires` Apt.installed ["apache2"]
]
+ -- My own openid provider. Uses php, so containerized for security
+ -- and administrative sanity.
+ | name == "openid-provider" = Just $ Docker.containerFrom
+ (image $ System (Debian Stable) "amd64")
+ [ Docker.publish "8081:80"
+ , Docker.inside $ props
+ & OpenId.providerFor ["joey", "liw"]
+ ]
-- armel builder has a companion container that run amd64 and
-- runs the build first to get TH splices. They share a home
@@ -96,6 +107,7 @@ container _host name
-- | Docker images I prefer to use.
image :: System -> Docker.Image
image (System (Debian Unstable) arch) = "joeyh/debian-unstable-" ++ arch
+image (System (Debian Stable) arch) = "joeyh/debian-stable-" ++ arch
image _ = "debian-stable-official" -- does not currently exist!
-- This is my standard system setup