DigitalOcean is a popular web hosting alternative to AWS and Azure. It is a cost-effective solution for hosting docassemble apps.
For deployment, DigitalOcean virtual machines (called 'Droplets') with docker pre-installed can be spun up quickly and docassemble installed there.
DigitalOcean Spaces are available to store the backups and configuration files. These are S3 compatible and therefore the setup is very similar to the AWS S3 instructions.
This setup uses both a new Droplet and Spaces.
The app is secured using LetsEncrypt SSL certificates.
-
This assumes you have already set up:
-
a new DigitalOcean Droplet with docker running - can be done with one click. A USD 10 per month droplet will usually be sufficient to get started with docassemble.
-
a new DigitalOcean Space (i.e. 'S3 bucket') to store the data and an access token - step-by-step instructions
-
-
Log into your Droplet and copy across the
.env
anddocker-compose.yml
file into a new project directory. -
Edit the
.env
file to add the settings for for your setup. As a minimum, make sure you setDAHOSTNAME
to the domain nameLETSENCRYPTEMAIL
to your valid email for LetsEncrypt to use.
-
Edit the
.env
file to add the configuration for the S3 compatible DigitalOcean Space:S3ENABLE=true
S3ENDPOINTURL=https://fra1.digitaloceanspaces.com
- or similar for other regions thanfra1
S3BUCKET=spaces_name
- putting in the name of your SpaceS3ACCESSKEY=yourkey
- from the access tokenS3SECRETACCESSKEY=yoursecret
- from the access token
-
Before starting up docassemble ensure you have a DNS record for the domain name pointing correctly to the IP address of the server. Without this, LetsEncrypt may fail to create a valid certificate for you.
-
Run using:
docker-compose up -d
-
In
docker-compose.yml
the restart option is set toalways
so that it will attempt to restart if the container goes down. -
For other settings, see the official documentation on configuration options.