github1 / dropler

Script for deploying containers to docker enabled DigitalOcean droplets

Repository from Github https://github.comgithub1/droplerRepository from Github https://github.comgithub1/dropler

dropler

Script for deploying containers to docker enabled DigitalOcean droplets

Options

  • -d — Set the dir to upload from (defaults to .)
  • -n — Set the droplet name (defaults to the upload dir name)
  • -e — Set environment variables passed to docker-compose (e.g. -e FOO=bar -e BAZ=qux)

Commands

  • up — Creates a Docker enabled DigitalOcean droplet
  • dns — Creates an A record pointing to the droplets public ipv4 address
  • provision — Rsyncs local source code to droplet and runs docker-compose
  • rsync — Rsyncs local source code to droplet
  • restart — Restarts the containers on on the droplet
  • status — Shows the status of the droplet and ipv4 address
  • down — Destroys the droplet/docker-compose services
  • ssh — Connects to the droplet via SSH
  • logs — Tails logs of containers on the droplet

Examples

Provisioning

The below command will create a new droplet (with docker and docker-compose installed), rsync the contets of ./example to the droplet, and run docker-compose up.

./dropler.sh up -d ./example

If you make a change to your source, running the below command will rsync the source to the droplet and re-build/re-run the container:

./dropler.sh provision -d ./example

Logs

You can get logs from the docker-compose process like so:

./dropler.sh logs -d ./example

SSH

SSH into the droplet:

./dropler.sh ssh -d ./example

Destroy

... finally, to destroy the droplet:

./dropler.sh down -d ./example

About

Script for deploying containers to docker enabled DigitalOcean droplets


Languages

Language:Shell 99.1%Language:Dockerfile 0.9%