Added MONGO_HOST variable
All checks were successful
pipeline / build-and-push-images (push) Successful in 1m6s
pipeline / deploy (push) Successful in 41s

This commit is contained in:
2025-01-20 12:30:55 +01:00
parent 6513ca492c
commit 52e1acd96c
4 changed files with 7 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ async function fetchLatestPatch() {
async function connectToDatabase() {
// Create a MongoClient with a MongoClientOptions object to set the Stable API version
const client = new MongoClient(`mongodb://${process.env.MONGO_USER}:${process.env.MONGO_PASS}@mongo:27017`)
const client = new MongoClient(`mongodb://${process.env.MONGO_USER}:${process.env.MONGO_PASS}@${process.env.MONGO_HOST}`)
await client.connect()
return client
}