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.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
The error log that you’ve shared indicates that the issue is with the SSL cert. You would need to make sure your Directus container has the proper SSL certificate to connect to the DigitalOcean managed PostgreSQL database. I could suggest connecting to the container and verifying that the CA certificate actually exists at
/directus/DO-SSL/ca-certificate.crt
.While connected to the container, make sure that the environment variables are being properly passed to the Directus container. You could use the
printenv
command to check that.You can also, quickly test the connectivity from your container using
psql
:Feel free to share your docker-compose file here so that I could try to spot any issues as well.
- Bobby