[ADVANCED] Serving Doodler as a web application for others to use
(page under construction)
These instructions assume you are using Ubuntu 20.04 (LTS) x64 on a Digital Ocean Droplet Virtual Machine (VM). You would need to adapt them to a different platform or OS
Setting up the droplet#
Below, you custom URL is called $URL and your IP address is written as $IP instead your actual IP address, XXX.XX.XXX.XXX
- Under Networkin/Domains, add your
$URLand www.$URLas separate domains, and redirect both of them to$IP - For each domain, you should have DNS records for 3 nameservers, ns1.digitalocean.com, ns2.digitalocean.com., and n3.digitalocean.com.
- Those same nameservers should be linked as custom nameservers with your domain name provider (I used namecheap.com)
Setting up newuser, firewalls, and installing anaconda#
Below, the new user is called newuser, but you'd probably want to use something more suited to you, the sysadmin
Log in as newuser:
Install Anaconda3
Allow some ports and other tings on the firewall, ufw
Downloading doodler code, setting up conda env#
Add user authentication, and test locally#
Install dash-auth to handle user authentication
Deactivate the environment, we no longer need it active
Type nano doodler.py and add
in the imports section at the top, then replace
with
This will tell gunicorn what object to serve (server) and makes use of Flask instead of Dash.
Add users and password combos just below like this
Run this:
And open a web browser and go here:
You should see the Doodler app, and you can log in using the credentials you set above
Setting up your web server, SSL and custom URL redirects#
Install nginx (for web serving) and certbot (for ssl)
Test getting your SSL certs in dry run mode
Assuming that completed without error, run for real:
See the certificate here: "https://www.ssllabs.com/ssltest/analyze.html?d=$URL&latest"
Setting up Doodler as a background service#
Then run these commands
open a web browser and go here:
And you should see Doodler. The service works. This should work on reboot, and in the background. Check on it any time using
Setting $URL redirect#
Edit this file:
Like this (replacing $URL with whatever it is):
Test the config files
Restart nginx and update the firewall
ow your doodler service will be running the app at
which redirects to
and finally to
I carried out this process and have a site hosted here