Change the mx.chrisdone.com mentions to your own domain.
Spin up a Droplet on DigitalOcean with docker-machine.
$ time docker-machine create \
--driver digitalocean \
--digitalocean-access-token $(cat ~/.do-token) \
--digitalocean-monitoring \
--digitalocean-region "lon1" \
--digitalocean-size "s-1vcpu-1gb" \
chrisdonemx
Running pre-create checks...
Creating machine...
(chrisdonemx) Creating SSH key...
(chrisdonemx) Creating Digital Ocean droplet...
(chrisdonemx) Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env chrisdonemx
real 2m3.009s
user 0m0.845s
sys 0m0.183s
Switch docker commands to refer to the remote machine:
$ eval $(docker-machine env chrisdonemx)
Start up the email server:
$ docker-compose up -d
Creating network "duta_default" with the default driver
Creating volume "duta_certs" with default driver
Pulling duta-web (chrisdone/duta-deploy@sha256:0b39ec0bc01c476a90792dccf683f593d9e25c2c493da4899b67e0caa73eada4)...
sha256:0b39ec0bc01c476a90792dccf683f593d9e25c2c493da4899b67e0caa73eada4: Pulling from chrisdone/duta-deploy
Pulling certbot-loop (chrisdone/certbot-loop@sha256:e67770ad671900d4b1f447b7771743b7c531b05046e7d7760cd538e1cf6fdb8e)...
sha256:e67770ad671900d4b1f447b7771743b7c531b05046e7d7760cd538e1cf6fdb8e: Pulling from chrisdone/certbot-loop
Creating duta_duta-web_1 ...
Creating duta_duta-smtp-receiver_1 ...
Creating duta_certbot-loop_1 ...
$
Done!