Skip to content

Commit

Permalink
docs: use port 17017 instead of 15432
Browse files Browse the repository at this point in the history
  • Loading branch information
polvorin committed Apr 3, 2024
1 parent d2cf67a commit 289d16e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
const { MongoClient } = require("mongodb");

// Configuration to connect to the MongoDB database on - ockam:15432
// Configuration to connect to the MongoDB database on - ockam:17017
//
// ockam:15432 is the inlet address of the tcp portal to MongoDB.
// ockam:17017 is the inlet address of the tcp portal to MongoDB.
// This inlet is local to analysis_corp, the MongoDB database is remote in bank_corp.
const uri = "mongodb://ockam:15432/mydb"
//const uri = "mongodb://localhost:27017/mydb"


const uri = "mongodb://ockam:17017/mydb"

// Attempt to connect to the database in a loop.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ ockam project enroll "$ENROLLMENT_TICKET"
# attribute mongodb-outlet="true" to connect to TCP Portal Inlets on this node.
#
# Create a TCP Portal Inlet to MongoDB.
# This makes the remote MongoDB available on all localhost IPs at - 0.0.0.0:15432
# This makes the remote MongoDB available on all localhost IPs at - 0.0.0.0:17017
ockam node create
ockam policy create --resource tcp-inlet --expression '(= subject.mongodb-outlet "true")'
ockam tcp-inlet create --from 0.0.0.0:15432 --via mongodb
ockam tcp-inlet create --from 0.0.0.0:17017 --via mongodb

# Run the container forever.
tail -f /dev/null
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo "Enrolled!"
# Create an access control policy that only allows project members that possesses a credential with
# attribute mongodb-inlet="true" to connect to TCP Portal Outlets on this node.
#
# Create a TCP Portal Outlet to MongoDB at - mongodb:5432.
# Create a TCP Portal Outlet to MongoDB at - mongodb:27017.
ockam node create
ockam relay create mongodb
ockam policy create --resource tcp-outlet --expression '(= subject.mongodb-inlet "true")'
Expand Down

0 comments on commit 289d16e

Please sign in to comment.