docker
docker copied to clipboard
Source password via variable
How hide password from manticore.conf? Can I use a variable?
docker-compose.yml:
version: "3.7"
networks:
backend:
driver: bridge
services:`
manticore:
image: manticoresearch/manticore
restart: unless-stopped
environment:
- variable_sql_pass=${DB_ROOT_PASSWORD} <--- password from secret .env
ports:
- 127.0.0.1:9306:9306
ulimits:
...
depends_on:
- db
volumes:
- ./docker/manticore:/etc/manticoresearch
networks:
- backend
./docker/manticore/manticore.conf:
source mysource
{
type = mysql
sql_host = db
sql_user = root
sql_pass = <---- password via variable possible?
sql_db = mydb
sql_port = 3306
}
...
It's not possible with the default entrypoint, but it sounds like a good idea to extend the env vars functionality. Currently it supports updating searchd/common settings via env vars. Would you like to extend the functionality and make a pull request?
Yes, please, extend the env vars functionality is a good solution.
I read the documentation and was surprised that only searchd/common settings is supported.
Not sure when we'll have time for it, but we'll be glad to review and accept your pull request :)