cli commands application for nextdeploy project
A client developed in Ruby allows communication with the rest api via the command line.
A small configuration file is related to the script and must contain the email / password of the user. An example of /etc/nextdeploy/nextdeploy.conf
email: firstname.lastname@example.org password: word123123 endpoint: nextdeploy.local
Please execute "install.sh" bash script.
A Docker Image with last ndeploy version is ready to use. Assume that the setting folder is /etc/nextdeploy on the host (change it if different).
docker run --rm -v ~/.ssh:/var/www/.ssh -v /etc/nextdeploy:/nextdeploy -v $PWD:/app -t -i nextdeploy/ndeploy
For daily use, it's better to have a generic script
# get generic script from this github repository wget -q "https://raw.githubusercontent.com/ricofehr/nextdeploy-cli/master/docker.sh" -O /usr/local/bin/ndeploy # edit the script and change USERNAME / PASSWORD / ENDPOINT values vi /usr/local/bin/ndeploy # you can use the cli cmd everywhere in your system ndeploy
The ruby client manages the following commands
ndeploy clone [name] # clone project in current folder ndeploy config [endpoint] [username] [password] # get/set properties settings for nextdeploy ndeploy destroy [idvm] # destroy a vm ndeploy details [idvm] # Display some details for a vm ndeploy docker # [BETA] launch containers for execute current project ndeploy folder [idvm] [workspace] # Share project folder from a vm ndeploy getftp assets|dump|backup [project] [file] # Get a file from project ftp ndeploy help [COMMAND] # Describe available commands or one specific command ndeploy launch [name] [branch] # Launch a new vm ndeploy list [--all] [--head n] # list launched vms for current user. ndeploy listftp assets|dump|backup [project] # List files from project ftp ndeploy logs [idvm] # Display some logs for a vm ndeploy projects # list projects for current user ndeploy putftp assets|dump [project] [file] # Put a file onto project ftp ndeploy ssh [idvm] # ssh into a vm ndeploy sshkey # Put your public ssh key (id_rsa.pub) onto NextDeploy ndeploy sshkeys # List sshkeys actually associated to the current user ndeploy up # launch a new vm with current commit (in current folder) ndeploy upgrade [--force] # upgrade ndeploy with the last version ndeploy version # print current version of ndeploy
More specificaly, the "ndeploy docker" subcommand has lot of options available
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature).
- Commit your changes (
git commit -am 'Add some feature').
- Push to the branch (
git push origin my-new-feature).
- Create new Pull Request.