You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please provide a working example of a docker-compose file?
I tried to clone repo and run docker, but it gives me an error:
> insta-saver-bot@0.1.6 start
> node src/index.js
[2025-01-12 05:34:08.162] Insta saver running at http://localhost:6060
error: [polling_error] {"code":"EFATAL","message":"EFATAL: Telegram Bot Token not provided!"}
[2025-01-12 05:34:08.171] Error connecting to MongoDB: Error: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
at NativeConnection.createClient (/app/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:219:11)
at NativeConnection.openUri (/app/node_modules/mongoose/lib/connection.js:823:34)
at Mongoose.connect (/app/node_modules/mongoose/lib/mongoose.js:429:15)
at connectDB (/app/src/config/database.js:8:24)
at Server.<anonymous> (/app/src/index.js:81:19)
at Object.onceWrapper (node:events:641:28)
at Server.emit (node:events:527:28)
at emitListeningNT (node:net:1414:10)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
I run the container with the following parameters:
Developer app is not working, because he not updated readme, env file and uses hardcoded localhost:6379 endpoint to redis here
I dont want to change code and rebuild image, so fast solution use network_mode: host. Also mongodb must be configured in replicaset mode or it crushes for me. But it requires keyfiles, tried disable it but still no connection. Tired to fix this bugs, so may require help
Close via ufw ports, or you will get hacked!
version: '3.9'services:
mongodb:
image: mongo:latestcontainer_name: mongodbenvironment:
MONGO_INITDB_AUTH: "disabled"# MONGO_INITDB_ROOT_USERNAME: root# MONGO_INITDB_ROOT_PASSWORD: toorMONGO_INITDB_REPLICA_SET_NAME: rs0 # Set the replica set namecommand: ["mongod", "--replSet", "rs0"] # Start MongoDB as a replica setvolumes:
- ./mongodb_data:/data/dbnetwork_mode: hostinsta-saver-bot:
image: ghcr.io/akashvaghela09/insta-saver-bot:latestcontainer_name: insta-saver-botenvironment:
- "MONGO_URI=mongodb://localhost:27017"
- "TELEGRAM_TOKEN=token"
- "PORT=6060"depends_on:
- mongodb
- redisnetwork_mode: hostredis:
image: redis:latestcontainer_name: redisnetwork_mode: host
Can you please provide a working example of a
docker-compose
file?I tried to clone repo and run docker, but it gives me an error:
I run the container with the following parameters:
The text was updated successfully, but these errors were encountered: