Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.


Folders and files

Last commit message
Last commit date

Latest commit



18 Commits

Repository files navigation

This project is no longer maintained.


JavaScript generator of cloud-config files, using Halcyon to deploy Haskell applications. Intended for use with DigitalOcean. Supports CentOS 7.0 and Ubuntu 14.04.


The generated cloud-config file performs a number of actions:

  1. Creates a new user account to install and run the application, named app.
  2. Starts a setup monitor OS service.
  3. Installs the OS packages required for Halcyon, including git.
  4. Uses git to install Halcyon into /app/halcyon.
  5. Uses Halcyon to install the application into /app.
  6. Registers the application as an OS service.
  7. Starts the application.
  8. Stops the setup monitor.

The setup monitor responds to HTTP GET requests with a streaming log of the installation process. By default, the log is available for 1 hour after the installation begins.

A Cabal package description file declaring an executable must be included at the top level of the application source repository. The name of the executable will be used as the OS service name, and as part of the default command for running the application.


halcyon-cloud-config is used by Haskell on DigitalOcean. Please see the source code of halcyon-website for a complete usage example.


formatDigitalOceanUserData(platform, sourceUrl, opts)

Returns a cloud-config file as a string, intended to be supplied as the user_data parameter to the DigitalOcean “Create a new droplet” API endpoint.

Argument Description
platform Either centos or ubuntu. Required.
sourceUrl git URL of the application source repository. Required.
opts.envVars Environment variables to set both before installing and running the application.
opts.command Command to run the application. Defaults to /app/bin/${executable}.
opts.description Application description. Defaults to Haskell on DigitalOcean app.
opts.port Application listening port. Defaults to 8080.
opts.monitorLife Time during which the setup monitor is active, in seconds. Defaults to 3600.
opts.monitorPort Setup monitor listening port. Defaults to 4040.


$ bower install halcyon-cloud-config

Scripts using halcyon-cloud-config must be processed with webpack in order to include the required platform-specific configuration files.


Made by Miëtek Bak. Published under the BSD license. Not affiliated with DigitalOcean.


JavaScript generator of cloud-config files







No releases published