Certificate location #1388
-
Hi, This is a super basic question but I simply cant find or workout the answer. I am running mockoon via Docker: docker run -d -p 3001:3001 mockoon/cli:latest -d https://mygiturl/myfile.json -p 3001 I have enabled TLS in the file and have the certs (certificate.crt, ca_bundle.crt and private.key) but my question is
I am sorry this is such a basic question but i have tried everything i can think of. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, most file paths in Mockoon support both absolute paths and relative paths. If you use an absolute path, you will have to put the file in the same spot on all the machines. However, if you provide a relative path, it is automatically resolved from the data file you are loading. ("myfile.json"). |
Beta Was this translation helpful? Give feedback.
Hi, most file paths in Mockoon support both absolute paths and relative paths. If you use an absolute path, you will have to put the file in the same spot on all the machines. However, if you provide a relative path, it is automatically resolved from the data file you are loading. ("myfile.json").
In you example, you are loading a data file using a URL, so, the relative path trick will not work. I suggest that you first download this file using something like
wget https://mygiturl/myfile.json
, put the cert files in the same folder, and then run the CLI usingdocker run -d -p 3001:3001 mockoon/cli:latest -d ./myfile.json -p 3001
.And in your TLS setup, you use relative paths: