title: Specify bolt port for a neo4j docker container
body: <p>I have two neo4j containers created using a <code>docker-compose.yml</code> file.</p>
  <pre><code>version: '2'
  services:
    neo4jdev1:
      image: neo4j
      ports: 
           - &quot;7474:7474&quot;
           - &quot;7687:7687&quot;
      volumes:
           - $HOME/neo4jdev1/data:/data
      expose:
           - &quot;7687&quot;
           - &quot;7474&quot;
    neo4jdev2:
      image: neo4j
      ports: 
           - &quot;7475:7474&quot;
           - &quot;7689:7689&quot;
      volumes:
           - $HOME/neo4jdev2/data:/data
      expose:
           - &quot;7689&quot;
           - &quot;7475&quot;
  </code></pre>
  <p>When I run this using <code>docker-compose up</code>, I get the two services running. I checked those by visiting the following URLS.</p>
  <p><code>https://192.168.99.100:7474</code></p>
  <p><code>https://192.168.99.100:7475</code></p>
  <p>As you can see I am trying to expose port 7689 for my second service because I want to use it as the port for bolt instead of the default 7687.</p>
  <p>In my unit tests, I tried to connect to bolt using both drivers.</p>
  <h1>Test 1 (using port 7687) - PASS</h1>
  <p><code>IDriver driver = GraphDatabase.Driver(&quot;bolt://192.168.99.100:7687&quot;, AuthTokens.Basic(&quot;neo4j&quot;, &quot;password&quot;));</code></p>
  <h1>Test 2 (using port 7689) - FAIL</h1>
  <p><code>IDriver driver = GraphDatabase.Driver(&quot;bolt://192.168.99.100:7689&quot;, AuthTokens.Basic(&quot;neo4j&quot;, &quot;password&quot;));</code></p>
  <p>Here's what I have done so far. I edited the config file inside the container located at <code>/var/lib/neo4j/conf/neo4j.conf</code>. I changed this line from</p>
  <p><code>dbms.connector.bolt.address=0.0.0.0:7687</code> to <code>dbms.connector.bolt.address=0.0.0.0:7689</code></p>
  <p>After saving the config file, the test still fails and the bolt port still shows 7687 in the neo4j browser.</p>
  <p><a href="https://i.stack.imgur.com/q1PS4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q1PS4.png" alt="enter image description here" /></a></p>
  <p>Is there another way to specify the bolt port on the docker-compose file or is there another way to change the bolt port in the running container itself?</p>