Skip to content
Browse files

documented spawn

  • Loading branch information...
1 parent 675f5a8 commit ac71ce0d12ed43f71135f58cc1838e0d7d12b2fe @substack committed
Showing with 41 additions and 0 deletions.
  1. +41 −0 doc/spawn.markdown
View
41 doc/spawn.markdown
@@ -0,0 +1,41 @@
+fleet-spawn(1) -- Run services on drones.
+=========================================
+
+## SYNOPSIS
+
+ fleet spawn [<options>] -- [<command>...]
+
+## DESCRIPTION
+
+Execute `<command>` on a drone and restart the process when it dies.
+
+Your spawned process will get the `$REPO` name, `$COMMIT` hash, `$DRONE_ID`, and
+`$PROCESS_ID` as environment variables from propagit.
+
+## OPTIONS
+
+* drone - Specify a drone to connect to by its drone ID. You can specify `'*'`
+ to spawn a command on all the drones.
+* env.`<name>` - Set environment variables for the commands.
+* commit - Spawn the command on a specific deployed commit.
+ Defaults to the latest commit.
+* repo - Spawn the command under this repo name.
+ Defaults to the closest directory name with a `.git/` in it.
+
+If you haven't set a remote with `fleet remote`, you'll need to specify these
+options:
+
+* hub - location of the hub as a "host:port" string
+* secret - optional passphrase to connect to the hub
+
+## EXAMPLE
+
+Start a process on a randomly-selected drone:
+
+ $ fleet spawn -- node server.js 8888
+ (spawned a25d7033#edc743)
+
+Start a process with custom environment variables:
+
+ $ fleet spawn --env.FOO=3 --env.BAR=kapow -- ./beep.js 5000
+ (spawned b95fc0fd#07ac33)

0 comments on commit ac71ce0

Please sign in to comment.
Something went wrong with that request. Please try again.