diff --git a/README.md b/README.md index de56d91..276def9 100644 --- a/README.md +++ b/README.md @@ -29,18 +29,50 @@ want to either build images or manage garbage collection roots if you control the deployment host. Either of these has yet to be implemented. -# How do I use Arion? +# Install -The command line inherits most `docker-compose` commands. These -examples assume you're in this repo's `examples/` directory. +Have [Nix](https://nixos.org/nix/) and Docker installed. -TODO examples + git clone git@github.com:hercules-ci/arion.git + nix-env -iA arion -f . -# Do I need to use Hercules CI? +# Example of usage + +The command line inherits most `docker-compose` commands. + + git clone git@github.com:nix-community/todomvc-nix.git + cd todomvc-nix/deploy/arion + arion up + +# "FAQ" + +### Do I need to use Hercules CI? Nope, it's just Nix and Docker Compose under the hood. -# Why "Arion"? + +### Does Arion support Docker images? + +Yes, you can still specify a docker image. For example: + + postgres = { + service.image = "postgres:10"; + service.volumes = [ "${toString ./.}/postgres-data:/var/lib/postgresql/data" ]; + service.environment.POSTGRES_PASSWORD = "mydefaultpass"; + }; + +### What about garbage collection? + +Arion removes the need for garbage collecting docker images, +delegating this task to Nix. + +Arion creates a garbage collection root and cleans it up after +completing the command. This means that `arion up` without `-d` is +safe with respect to garbage collection. A deployment that is more +serious than local development must leave a GC root on the deployment +host. This use case is not supported as of now. + +### Why "Arion"? Arion comes from Greek mythology. Poseidon, the god of ~Docker~ the seas had his eye on Demeter. Demeter tried to trick him by disguising