Connor-Cahill / DropletActions

Documentation Website for Droplet Actions CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Droplet Actions CLI

Helping you take the headache out of deploying projects to Digital Ocean Droplets.

You did the thing once, why do it again?

Click here to visit project repo

Overview

Droplet Actions is a CLI built to simplify the process of shipping web apps to/managing Digital Ocean Droplets. This CLI removes the need for you to:

  • Navigate to the Digital Ocean dashboard to manage droplets
  • SSH into droplet to set it up tools such as docker & docker-compose
  • SSH into droplet to clone repositories/setup environment variables to deploy projects

DropletActions lets you handle the process of creating Droplets, setting up Droplets with proper dev tools, cloning your repos & environment variables over to your VPS.

This can take an annoying process that requires using the Digital Ocean GUI and ssh-ing into the Droplet.

Installation/Setup

...

Usage

Once the CLI is installed and setup you should be able to use it in your terminal freely. You will always start with the top level command "dropletactions" the specify command and arguments:

    $ dropletactions <COMMAND> <ARGS>

Note: go to the Command section for a list of arguments for each command.

Basic Commands

This section breaks down the current available commands and specifies arguments that must be passed for each

Create

The create command creates a fresh DO Droplet. Note this command creates Droplet with lots of default settings at this point. Things to note:

  • Droplet automatically created on $5/month plan
  • Uses defualt Ubuntu image
  • Connects all SSH Keys on your DO account to new droplet
  • Sets region to "sfo2" (San Francisco 2)
  • IPv6 is false
  • Backups are false

Although I would like to make these all inputs in the future it currently builds the cheapest option with no other bells or whistles.

Arguments:

  • Droplet Name

Example Use:

    $ dropletactions create my-new-droplet

List

The list command lists out all of your Droplets:

  • name
  • ID
  • Public IP

note: pagnation is not setup yet and the list command will return at most 20 Droplets


This command is useful for when you need to pass a Droplets Public IP or ID through another command as an argument. The list command does not take any arguments.


Example Use:

    $ dropletactions list

Delete

The delete command destroys a droplet or multiple droplets in your Digital Ocean account.

Argument:

  • Droplet ID/s - one or multiple Droplet IDs of the Droplets you want destroyed

Example Use:

    $ dropletactions delete 31493843982 32014873214

Setup Commands

These are commands that involve setting up Droplets or deploying your projects on a Droplet.

Setup Docker

the setupDocker command will setup docker and docker-compose on your Droplet.


Arguments:

  • Droplet Public IP - public IP for droplet

Example Use:

    $ dropletactions setupDocker 192.0.2.1

Get Project

the getProject command will clone a project from GitHub onto your Droplet into user specified directory.


Arguments:

  • Droplet Public IP - public ip address for droplet you want project cloned into
  • Project Repo Link - GitHub clone link for your repo
  • Directory Name - Dir name you want your Project cloned into on your VPS

Example Use:

    $ dropletactions getProject 192.0.2.1 https://github.com/Connor-Cahill/DropletActionsCLI.git DropletActionsCLI

Copy Env

The copyEnv command will secure copy over your .env file onto your VPS. This will save you time from having to go manually setup environment/config vars.


Arguments:

  • Path to .env file - filepath to your .env file on your local machine
  • Droplet Public IP - public ip address for Droplet you want .env copied onto
  • Path To Copy - file path on Droplet where you want the .env copied

Example Use:

    $ dropletactions copyEnv $HOME/dropletActions/.env 192.0.2.1 dropletActions/

Start Compose

The startCompose command will run docker-compose up -d on user specified directory on Droplet.


Arguments:

  • Droplet Public IP - public ip address for Droplet you want .env copied onto
  • Path to docker-compose file - file path to the docker-compose.yml file on Droplet

Example Use:

    $ dropletactions startCompose 192.0.1.2 myProject/compose

Down Compose

The downCompose command will run docker-compose down on user specified directory on Droplet, stopping instance of app.


Arguments:

  • Droplet Public IP - public ip address for Droplet you want .env copied onto
  • Path to docker-compose file - file path to the docker-compose.yml file on Droplet

Example Use:

    $ dropletactions downCompose 192.0.1.2 myProject/compose

Feature Roadmap

Here is a short list of future feature we plan on implementing into DropletActions CLI.

  • 2 Factor Authentication with Authy
    This is the most important feature on this list as it will provide more security for users. This will provide a secure way to manage Droplets from your terminal.

  • More Setup Commands
    Currently only supports setting up Droplets with docker and docker-compose. We intend on adding way more options for setting up Droplets such as dokku and other software.

  • Better Text Formatting & UX
    The UX is a little choppy with how arguments are passed and text is outputted. We are working make it a better experience visually and usability wise for the user.

Really Interested In DropletActions CLI?

If you are really interested in the DropletActions CLI and want to contribute reach out to me via Github!

About

Documentation Website for Droplet Actions CLI


Languages

Language:HTML 100.0%