Ship all kinds of services.
npm install -g hms
Afterwards you should have an command line tool called
NB. even though the terms refer to dock and docks it is not meant to be read as containerized Docker images. This project will not help you ship Docker images.
First ssh to a remote server and install hms. Then start up a terminal.
In a new folder start the dock (or multiple docks as seperate processes). The dock will run your apps
hms run-dock localhost:10002 --tag my-dock --port 10003 # add a some tags
localhost:10002 is the address to the terminal running on the machine, the newly created dock will run on
Then on your local machine add the remote
hms remotes add my-remote firstname.lastname@example.org
hms uses ssh to contact the server so
email@example.com should be similar to the arguments you passed to ssh.
Then add a simple node app
hms add my-remote my-app --start 'node .' --build 'npm install' --tag my-dock hms info my-remote my-app
--start argument is your start script,
--build is your build script and
--docks tells hms to deploy it to 1 dock.
You are now ready to deploy your service. Goto your local app folder and do
hms deploy my-remote my-app hms info my-remote my-app
The info output should verify that the app is running.
All commands have the following syntax
hms [command] [remote] [service|dock?] [options]
Manage and verify remotes.
hms remotes add [remote-name] [remote-url] to add a new remote
hms remotes remove [remote-name] to remove a remote
hms remotes to list all remotes
--key,-k to specify an explicit ssh key. Per default
~/.ssh/id_rsa and the ssh agent is used.
List the docks on a given remote. Detailed information about the services on the given dock is printed if a dock name is specified.
List the services on a given remote. Detailed information about the service, and the docks it is running on, is printed if a service name is specified.
Print detailed information about a service, and the docks it is running on, on a remote.
Add a new service.
--start,-sto specify a
node .to start a node service
--build,-bto specify a
npm install .to install node modules
--tag,-tto specify the docks tags to match when choosing where to deploy to.
--limit,-lto set a max limit on the number of docks to deploy to.
--env,-eto set env varibles. Format is
ENV_VAR=valueif more than one env variable is needed multiple
--envcan be used.
Update an existing service. Accepts the same options as
Note that update will not restart the service. To do this just issue a
To delete an env variable just set it to an empty string, i.e.
Upload cwd as a tarball to service-name and deploy and restart it.
--revisionto set a deploy revision tag. Defaults to
git describeif you are in a git repo.
hms will tail service output and print it to stdout until you hit
Stop and remove a service.
Send a start/stop/restart signal the service. All restarts can be done gracefully by listening for
SIGTERM and exiting nicely.
(deprecated, please use
List processes running on all docks. Omit the service name to list all processes.
--envto also list the environment that the processes use.
Tail the log of a service. Omit the service name to tail all services. hms does not save any logs so this is just the live tail of stdout/stderr and various events.
Run the following commands on your remote server that you want to deploy to
Starts a "build-and-distribute" hub that you can deploy to. After you deploy to a terminal it will run the build script and distribute the build to the docks.
--port,-pto change the port the terminal binds to. Defaults to 10002
--dbto set the db file
Starts a dock that can run and manage services.
--id,-ito give the dock an optional id. Defaults to hostname
--port,-pto change the port the dock binds to. Defaults to 10002
--tag,-tto give this dock some tags that you can match when deploying
--dbto set the db file