0

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?

  • Does supervisord reset the environment for each process it controls? Overriding the `entrypoint:` like this seems a little unusual, does deleting the `entrypoint:` line help? – David Maze Aug 21 '23 at 10:50
  • Please provide enough code so others can better understand or reproduce the problem. – Community Aug 22 '23 at 13:26
  • @DavidMaze it didn't help, but updating version to 3.8 did the trick. – Sven Martoen Aug 23 '23 at 07:50

1 Answers1

0

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"
MPesi
  • 212
  • 8