Deploy on Digital Ocean
This is an example installation on DigitalOcean. For sure there are many more paths how-to install OpenEndpoints on DigitalOcean.
Sign up to DigitalOcean or be invited to an existing account
On the left hand navigation go to “API” and “Generate New Token” with a name such as your name. Record the token somewhere for later.
Create a Project
Top-left of the navigation all projects are listed
Click on “New Project”
Enter the name “Endpoints”
For “What’s it for” answer “Operational / Developer tooling”
For “Environment” answer “Production”
Upload the Endpoints software as a Docker image to DigitalOcean Docker Repository
Go to “Container Registry” on the left hand side navigation
Use a name which is unique to your company or product; this is globally unique across all of DigitalOcean. We use “endpoints” in this example. Highlighted in green so that you know where you need to replace it in the later steps.
wget ``https://github.com/digitalocean/doctl/releases/download/v1.17.0/doctl-1.17.0-linux-amd64.tar.gz
See bug https://stackoverflow.com/a/60237742/220627curl -sL https://github.com/digitalocean/doctl/releases/download/v1.38.0/doctl-1.38.0-linux-amd64.tar.gz | tar -xzv
sudo mv ~/doctl /usr/local/bin
mkdir ~/.config
# see bug https://github.com/digitalocean/doctl/issues/591doctl auth init
sudo doctl registry login
sudo docker pull public.ecr.aws/x1t6d0t7/endpoints-he
sudo docker tag public.ecr.aws/x1t6d0t7/endpoints-he registry.digitalocean.com/<your-name>
sudo docker push registry.digitalocean.com/<your-name>
Create a database:
Click on “Databases” in left navigation
Choose “PostgreSQL”
Currently we recommend PostgreSQL 14 (although other versions will probably work).
We recommend starting with the cheapest version which is “Basic Node” with 1GB of RAM.
Choose your Data Center.
Under “Choose a unique database cluster name” choose something like “endpoints”.
Click the green “Create a Database Cluster” at the bottom of the screen to actually start the creation process. (The creation process takes a while, e.g. 5-10 minutes.)
After you start the creation process, the resulting screen displays information about the database, with a few tabs such as “Overview”, “Insights” etc.
Create the application:
On the left navigation click on “Apps”
Create a new app
Select the 4th option (without the icon) “DigitalOcean Container Registry”
Add the following environment variables:
JAVA_OPTIONS=-verbose:gc
ENDPOINTS_BASE_URL
- Use whatever domain you want the service to be running under e.g. https://endpoints.mycompany.com/ENDPOINTS_JDBC_URL
Go to the database settings screen
Go to the bottom right of the screen “Connection Details”
Select the default “Public Network”
Use a format like
jdbc:postgresql://<host>:<port>/<database>?user=<username>&password=<password>
ENDPOINTS_SERVICE_PORTAL_ENVIRONMENT_DISPLAY_NAME=DigitalOcean
Choose an app name, this is used in the internal URL but otherwise doesn’t matter much
Wait for it to deploy
See the URL and check it works
Enter a CNAME in your DNS from the URL you want to the one that DigitalOcean has supplied
Go to Settings, in “App Settings” under “Domains” add the domain you want the service to run under, so that HTTPS certificates work.
Last updated