I'm trying to pass parameters using Docker compose to Memgraph. This what my docker compose file looks like:
version: "3"
services:
memgraph-platform:
image: "memgraph/memgraph-platform"
ports:
- "7687:7687"
- "3000:3000"
- "7444:7444"
volumes:
- mg2_lib:/var/lib/memgraph
- mg2_log:/var/log/memgraph
- mg2_etc:/etc/memgraph
environment:
- MEMGRAPH="--memory-limit=256 --log-level=TRACE"
entrypoint: ["/usr/bin/supervisord"]
volumes:
mg2_lib:
mg2_log:
mg2_etc:
I can't find the log files after this. If I omit --memory-limit=256
from compose file than I can find the log files. It looks like parameters are ignored. How can I fix this?
There were some issues with version 3 of Docker reading only the first flag of the environment variables. Try upgrading to version 3.8 and separating your variables into a .env
file. Your docker-compose
file would then look something like this:
version: "3.8"
services:
memgraph-platform:
image: "memgraph/memgraph-platform"
ports:
- "7687:7687"
- "3000:3000"
- "7444:7444"
volumes:
- mg2_lib:/var/lib/memgraph
- mg2_log:/var/log/memgraph
- mg2_etc:/etc/memgraph
env_file:
- /.env
entrypoint: ["/usr/bin/supervisord"]
volumes:
mg2_lib:
mg2_log:
mg2_etc:
and your .env
file:
MEMGRAPH="--memory-limit=256 --log-level=TRACE"