1

I need to run two Neo4j containers and so would like them accessible on different ports. The first one I've started like this:

podman run --name neo4j-development -p 7687:7687 -p 7474:7474 -e "NEO4J_AUTH=none" docker.io/library/neo4j

The second, I've tried like this:

podman run --name neo4j-testing -p 7688:7688 -p 7475:7475 -e [NEO4J_AUTH=none,NEO4J_server_bolt_advertised__address=7688,NEO4J_server_http_advertised__address=7475] docker.io/library/neo4j

But, every time I run that second command the output shows Neo4j starting up on port 7687. Is there something wrong with my Podman command, or could this be a Neo4j problem?

EDIT:

The comment below solved my immediate issue. Now I am trying to enable APOC on these Neo4j container and failing when I try to pass an array of options I do as part of a Github workflow, i.e.

        # Docker Hub image
        image: neo4j:5.5.0
        ports:
          - 7474:7474 # used for http
          - 7687:7687 # used for bolt
        env:
          NEO4J_AUTH: none
          NEO4J_server.http.advertised_address: "localhost:7474"
          NEO4J_server.bolt.advertised_address: "localhost:7687"
          NEO4J_dbms_security_procedures_unrestricted: "apoc.*"
          NEO4J_apoc_export_file_enabled: true
          NEO4J_apoc_import_file_enabled: true
          NEO4J_apoc_import_file_use__neo4j__config: true
          NEO4JLABS_PLUGINS: '["apoc"]'

...translating to:

podman run --name neo4j-testing -p 7688:7687 -p 7475:7474 -e ["NEO4J_AUTH=none","NEO4J_dbms_security_procedures_unrestricted='apoc.*'","NEO4J_apoc_export_file_enabled=true","NEO4J_apoc_import_file_enabled=true","NEO4J_apoc_import_file_use__neo4j__config=true","NEO4J_PLUGINS='[\"apoc\"]" docker.io/library/neo4j

No luck here either; my tests complain of a lack of APOC. So, perhaps the the means of passing options with -e is wrong (I can't find any documentation to clarify this).

knirirr
  • 119
  • 4
  • You could keep the default ports and run with sth like `-p 7688:7687 -p 7475:7474` (or the other way around, I never remember). – fbiville Jun 30 '23 at 13:25
  • A cunning idea, indeed! This appers to indicate that the host port is specified as the first numer number: https://docs.podman.io/en/latest/markdown/podman-run.1.html (so you are correct). – knirirr Jun 30 '23 at 14:22

0 Answers0