joeyh

joeyh at

wrote 16 lines of haskell code, and the following config snippet and now Propellor automatically deploys and maintains my openid provider, inside a docker container (because php)

      | name == "openid-provider" = Just $ Docker.containerFrom
              (image $ System (Debian Stable) "amd64")
              [ Docker.publish "8081:80"
              , Docker.inside $ props
                      & Apt.stdSourcesList Stable
                      & Apt.unattendedUpgrades
                      & OpenId.providerFor ["joey", "liw"]
              ]

Raúl Benencia, Greg Grossmeier, Mike Linksvayer, jrobb and 1 others likes this.

Show all 7 replies

That is an insanely beautiful piece of code.

Raúl Benencia at 2014-04-08T22:47:45Z

I dunno, it annoys me that it mentions Stable twice, but I can't see a good way to refactor that ..

joeyh at 2014-04-08T23:04:38Z

Refactored :)

    | name == "openid-provider" = Just $ standardContainer Stable "amd64"
            [ Docker.publish "8081:80"
            , Docker.inside $ props
                    & OpenId.providerFor ["joey", "liw"]
                            "openid.kitenet.net:8081"
            ]

joeyh at 2014-04-08T23:44:11Z

Raúl Benencia likes this.