arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Deploy on Digital Ocean

This is an example installation on DigitalOceanarrow-up-right. For sure there are many more paths how-to install OpenEndpoints on DigitalOcean.

  1. Sign up to DigitalOcean or be invited to an existing account

  2. 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.

  3. Create a Project

    1. Top-left of the navigation all projects are listed

    2. Click on “New Project”

    3. Enter the name “Endpoints”

  4. Upload the Endpoints software as a Docker image to DigitalOcean Docker Repository

    1. Go to “Container Registry” on the left hand side navigation

    2. 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.

  5. Create a database:

    1. Click on “Databases” in left navigation

    2. Click "create"

  6. Create the application:

    1. On the left navigation click on “App Platform”

    2. Create a new app

For “What’s it for” answer “Operational / Developer tooling”

  • For “Environment” answer “Production”

  • On your local computer (e.g. Mac): Install "doctl", see https://docs.digitalocean.com/reference/doctl/how-to/install/

  • doctl auth init

  • doctl registry login

  • docker pull public.ecr.aws/x1t6d0t7/endpoints-he

  • `docker tag public.ecr.aws/x1t6d0t7/endpoints-he registry.digitalocean.com/endpoints/endpoints

  • docker push registry.digitalocean.com/endpoints/endpoints

  • 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.

  • Select "source provider" of “DigitalOcean Container Registry”
  • Add the following environment variables:

    1. JAVA_OPTIONS is -verbose:gc

    2. ENDPOINTS_BASE_URL- Use whatever domain you want the service to be running under e.g. https://endpoints.mycompany.com/

    3. ENDPOINTS_JDBC_URL

      1. Go to the database settings screen

      2. Go to the bottom right of the screen “Connection Details”

    4. ENDPOINTS_SERVICE_PORTAL_ENVIRONMENT_DISPLAY_NAME is e.g. 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.

  • Select the default “Public Network”

  • Use a format like jdbc:postgresql://<host>:<port>/<database>?user=<username>&password=<password>