activecm/rita

help with docker-compose.yml file

johnncennaa opened this issue · 2 comments

hello, I am having trouble with the config file as I keep getting this error and am not sure what to change in order for it to work. my docker-compose.yml file is the same as the default except with the paths I provided of course. I have provided a path to my CONFIG at the end of " - ${CONFIG:?You must provide a path to your CONFIG}:/mypathtoritaconfig/. " Here is the error I am getting:

invalid interpolation format for services.rita.volumes.[].
You may need to escape any $ with another $.
required variable CONFIG is missing a value: You must provide a path to your config.

Any help would be appreciated! Thanks!

^ I also did export CONFIG=/path to my confg

Hi there,
The last portion of the line needs to stay the way that it is, since that's the path that the container is going to use.
The format for the bind mount line is as follows:
- ${ENV_VALUE:-DEFAULT_PATH_IF_ENV_NOT_SET}:WHERE_DOCKER_WILL_PUT_FILES_IN_CONTAINER:READONLY_FLAG

Let's say your /mypathtoritaconfig is at /etc/rita/config.yaml, then this line should be:
- ${CONFIG:-/etc/rita/config.yaml}:/etc/rita/config.yaml:ro

The same goes for specifying the Zeek log directory to bind to:
- ${LOGS:-/opt/zeek/logs}:/logs:ro

If you exported an environment variable for CONFIG or LOGS, then that value will override whatever you placed in docker-compose.yml.