README.md in dockly-0.0.4 vs README.md in dockly-0.0.5

- old
+ new

@@ -1,5 +1,9 @@ +[![Gem Version](https://badge.fury.io/rb/dockly.png)](http://badge.fury.io/rb/dockly) +[![Build Status](https://travis-ci.org/swipely/dockly.png?branch=refactor_setup)](https://travis-ci.org/swipely/dockly) +[![Dependency Status](https://gemnasium.com/swipely/dockly.png)](https://gemnasium.com/swipely/dockly) + Dockly ======= `dockly` is a gem made to ease the pain of packaging an application. For this gem to be useful, quite a few assumptions can be made about your stack: @@ -19,23 +23,23 @@ docker :test_docker do # code here end ``` -Each object has an enumeration of valid attributes. The following code sets the `repo` attribute in a `docker` called `test_docker`: +Each object has an enumeration of valid attributes. The following code sets the `repository` attribute in a `docker` called `test_docker`: ```ruby docker :test_docker do - repo 'an-awesome-repo' + repository 'an-awesome-name' end ``` Finally, each object has zero or more valid references to other DSL objects. The following code sets `deb` that references a `docker`: ```ruby docker :my_docker do - repo 'my-repo' + repository 'my-name' end deb :my_deb do docker :my_docker end @@ -44,39 +48,67 @@ Below is an alternative syntax that accomplishes the same thing: ```ruby deb :my_deb do docker do - repo 'my-repo' + repository 'my-name' end end ``` +`build_cache` +------------- + +The `build_cache` DSL is used to prevent rebuilding assets every build and used cached assets. + +- `s3_bucket` + - required: `true` + - description: the bucket name to download and upload build caches to +- `s3_object_prefix` + - required: `true` + - description: the name prepended to the package; allows for namespacing your caches +- `hash_command` + - required: `true` + - description: command run inside of the Docker image to determine if the build cache is up to date (eg. `md5sum ... | awk '{ print $1 }'`) +- `build_command` + - required: `true` + - description: command run inside of the Docker image when the build cache is out of date +- `output_dir` + - required: `true` + - description: where the cache is located in the Docker image filesystem +- `tmp_dir` + - required: `true` + - default: `/tmp` + - description: where the build cache files are stored locally; this should be able to be removed easily since they all exist in S3 as well +- `use_latest` + - required: `false` + - default: `false` + - description: when using S3, will insert the S3 object tagged as latest in your "s3://s3_bucket/s3_object_prefix" before running the build command to quicken build times + `docker` -------- The `docker` DSL is used to define Docker containers. It has the following attributes: - `import` - required: `true` - - default: `nil` - description: the location (url or S3 path) of the base image to start building from - `git_archive`: - required: `false` - default: `nil` - description: the relative file path of git repo that should be added to the container - `build` - required: `true` - - default: `nil` - description: aditional Dockerfile commands that you'd like to pass to `docker build` -- `repo` +- `repository` - required: `true` - default: `'dockly'` - description: the repository of the created image +- `name` + - alias for: `repository` - `tag` - required: `true` - - default: `nil` - description: the tag of the created image - `build_dir` - required: `true` - default: `./build/docker` - description: the directory of the temporary build files @@ -91,10 +123,17 @@ - `build_caches` - required: `false` - default: `[]` - description: a listing of references to build caches to run +In addition to the above attributes, `docker` has the following references: + +- `build_cache` + - required: `false` + - class: `Dockly::BuildCache` + - description: a caching system to stop rebuilding/compiling the same files every time + `foreman` --------- The `foreman` DSL is used to define the foreman export scripts. It has the following attributes: @@ -131,11 +170,10 @@ The `deb` DSL is used to define Debian packages. It has the following attributes: - `package_name` - required: `true` - - default: `nil` - description: the name of the created package - `version` - required: `true` - default: `0.0` - description: the version of the created package @@ -183,10 +221,9 @@ version '1.0' release '1' docker do name :dockly_docker - tag 'dockly_docker' import 's3://dockly-bucket-name/base-image.tar.gz' git_archive '/app' timeout 120 build_cache do