#Deployment using Docker
1 messages · Page 1 of 1 (latest)
Hi @blazing creek , If our CLI cannot identify the configuration file path it runs the default settings with in memory. And it seems like this is the case with the command you provided because in your config path, you tried to give "/config" after pointing out the original config.yaml, and it's not in the right format. I'll explain with examples,
if I had a config.yaml file inside my Desktop, the path "{YOUR-CONFIG-PATH}:/config" would look like "Users/egeaytin/Desktop/config".
If my config file's name is something other than config, let's say I opened a file called permify.yaml and want to use it as my config file located on my Desktop, then the command config path would be "Users/egeaytin/Desktop/permify". So the "/config" part is just the name of the config file and you can change it if your configuration yaml file name is different.
Could you change the path accordingly and test it. Also I'm suggesting to use the latest version of the Permify which is v0.4.0.
Deployment using Docker
Please double-check that the content of your config file is not malformed. You can find an example config file at https://github.com/Permify/permify/blob/master/example.config.yaml.
thank you Ege!
but it does not seem to work with this command: docker run -p 3476:3476 -p 3478:3478 -v /Users/hongxiangliu/coding/sennder/authorization-service/config.yaml:/config ghcr.io/permify/permify:v0.4.0 serve
it still uses the in-memory database
I copied the file from the example.config.yaml you provided with everything unchanged. which should give me an error as the database does not exist
but it did succeed as you can see from the screenshot 😂
Firstly, I believe the path should be "/Users/hongxiangliu/coding/sennder/authorization-service/config", because it seems your config localted under "authorization-service" folder and if its the case there is no need to add ":/config" to the path.
Additionally, we also detected error. Specifically, we have tested just copying the example config file that I sent to you with the correct path and yes, it runs without giving an error as you stated. It should give an error and not run at all if the database couldn't be successfully configured.
We're looking into it right now and I'll let you know when we solve the issue.
I have copied content of the example config file and run it with following command. docker run -p 3476:3476 -p 3478:3478 -v /Users/egeaytin/Desktop/config ghcr.io/permify/permify:v0.4.0 serve It sh...
it seems that it does not read the config file at all
even when I use this command docker run -p 3476:3476 -p 3478:3478 -v /Users/hongxiangliu/coding/sennder/authorization-service/config.yaml ghcr.io/permify/permify:v0.4.0 serve with a wrong db password in the config.yaml file. it is still successfully launched
and it does not connect to the database I specified in the config.yaml file
and this command gave me an error which is weird
the config.yaml should be there
if I run the same command using alpine image I can see the config file mapping is correct
I suspect that there is a bug when reading config file
anyway, all of a sudden it works with this command docker run -it -p 3476:3476 -p 3478:3478 -v /Users/hongxiangliu/coding/sennder/authorization-service:/config ghcr.io/permify/permify:v0.4.0 serve
I think the :config is still needed as permify seems read config file from config/config.yaml
and the :config specifies the folder name inside the docker container
and in the example.config.yaml there is an error
not sure why but it works when I removed the whole line
Sorry for the typo yep the :config should be included but we still have problem on db configuration, passing wrong db uri and it still works. We’re looking that on the issue https://github.com/Permify/permify/issues/480
Last error ocuring because the ParseDuration called on your time string does not support d as a unit suffix
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
You are better off using the hours equivalent of 30d i.e. 720h to resolve the ambiguity.