I have a Caprover server with a Wappler app deployed to it.
I’m using an SSL cert to authenticate with the database, and the path is defined in the ENV.
From the Caprover docs:
The directory /captain/data/nginx-shared in your server is available in your nginx container as /nginx-shared . Let’s say you place a custom SSL cert in that folder and call it /captain/data/nginx-shared/custom-cert.pem . In order to reference that file in your nginx config, you’ll use /nginx-shared/custom-cert.pem
Wappler defines the system path in the docker file though:
ENV PATH /opt/node_app/node_modules/.bin:$PATH
Can I define the path from the root directory of the server to the SSL cert in the shared folder via ENV?
Thanks @Apple. That only works for persistent apps though.
I came up with another solution if anybody needs to add a DO cert for the db connection but doesn’t want to push it to git. You can store it in the ENV base64 encoded and extend express to write the file when the app starts: