Skip to content

Commit

Permalink
🐳 updated docker image to be compatible with new async mongodb driver v6
Browse files Browse the repository at this point in the history
  • Loading branch information
faburem committed Dec 2, 2024
1 parent f656bc7 commit ae3d182
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ if [ -n "${MONGO_URL:-}" ]; then # Check for MongoDB connection if MONGO_URL is
cd bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules
node <<- 'EOJS'
const mongoClient = require('mongodb').MongoClient;
setInterval(function() {
mongoClient.connect(process.env.MONGO_URL, function(err, client) {
if (client) {
console.log('Successfully connected to MongoDB');
client.close();
}
if (err) {
console.error(err);
} else {
process.exit(0);
}
});
setInterval(async function() {
let client;
try {
client = await mongoClient.connect(process.env.MONGO_URL);
} catch (err) {
console.error(err);
}
if (client && client.topology.isConnected()) {
console.log('Successfully connected to MongoDB');
client.close();
process.exit(0);
}
}, 1000);
EOJS
fi
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "titra",
"version": "0.99.24",
"version": "0.99.25",
"private": true,
"scripts": {
"start": "meteor run"
Expand Down

0 comments on commit ae3d182

Please sign in to comment.