Question

Connect Directus Container on droplet to DO db

I am VERY new to this side of dev ops and am starting a company, so I am doing it all. Dev-Ops, software dev, and system administration.

I built the proof of concept and ran on local host using docker containers. We are now moving to a real deployment. We are using Directus for our CMS, and have been using a PSQL Docker container with persistent volume, however this seems dangerous as heck. We want to move away from the PSQL container and set up a DO PSQL db.

I have set up the DO db, migrated in our data. I can shell into the db from the droplet and see the data. The issues is when we go into the Directus env and roll over to the new configs it appears as they are not being picked up.

This is from the DO db logs:

[15-1] pid=999242,user=[unknown],db=[unknown],app=[unknown],client=10.1xx.x.x LOG: could not accept SSL connection: Success

this is the connection from Directus container trying to hit the db.

This is my config: (ignore the #, we rolled back but commented out)

# KEY=8D095490-..................
# SECRET=0A9B5BC3-.............................
# DB_CLIENT=pg
# DB_HOST=private-dev-postgres-do-user-xxxxxxxx-0.b.db.ondigitalocean.com
# DB_PORT=25060
# DB_DATABASE=xxxx-xxx-connection-pool
# DB_USER=aita
# DB_PASSWORD=AVNS_.....................
# DB_SSL__CA=/directus/DO-SSL/ca-certificate.crt
# STORAGE_LOCATIONS=digitalocean
# STORAGE_DIGITALOCEAN_DRIVER=s3
# STORAGE_DIGITALOCEAN_KEY=DIRECTUS-Access-DO
# STORAGE_DIGITALOCEAN_SECRET=Sm1cpr.......................
# STORAGE_DIGITALOCEAN_BUCKET=dev-postgres
# STORAGE_DIGITALOCEAN_REGION=NYC1
# PUBLIC_URL=https://admin.aiteachassist-dev.com
# ADMIN_EMAIL=xxxxxxxxxxxxxx@xxxxxxxxxxxx.com
# ADMIN_PASSWORD=a.........................2

from the Directus docs and the DO docs I cannot seem to find much outside of using a config in which DO apps is used when connecting to the db. Again we have a droplet that is running around 8 containers (3 of which will go away when we can get the db figured out; PSQL, Redis, and Mongo). If I can get the one handled the other 2 will be a breeze.

Any help of recommendations would be great.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel