System Information
- Strapi Version: 4.10.5
- Operating System: Some Ubuntu on Digital Ocean App platform, can’t really tell
- Database: PostgreSQL v15 database cluster
- Node Version: v17.9.1
- NPM Version: v8.11.0
- Yarn Version: -
Hi Strapi Team!
I followed the official docs on deploying Strapi to DigitalOcean, but I’ve run into this problem:
Error: self-signed certificate in certificate chain
I eventually figured out why this was happening after adding some console logs to my config files. It turns out that the production config files are not being read, which produces the above error.
The documentation above tells you to create a file: config/env/production/database.ts
I created this file and also added a console log to it console.log('production config file loaded');
.
I also added a console log to the main config file, which gets merged with every other environment-specific config file:
console.log('final configuration', connections[client]);
console.log('final configuration', connections[client].connection);
Here you can see what happens when the deployment runs.
Another documentation page states, Everything defined in the production configuration will override the default configuration.
but the production config is not being processed at all. NODE_ENV
is defined as an App-Level environment variable.
Since this is such a basic functionality, I’m sure I missed something trivial.
I appreciate any input!
Thanks,
Akos