Issue while booting up the application . #96
-
@leandrofars post execution of docker compose command images(mongo,mochi,golang node etc) are up but when we try execute I am facing the below error in my local environement could you please help me on the same. /oktopus/backend/services/controller/cmd/oktopus$ go run main.go -u root -P root -mongo "mongodb://127.0.0.1:27017" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Controller is trying to login into a mongodb in your localhost, which doesn't seem to exist. Try to use a valid mongo url. |
Beta Was this translation helpful? Give feedback.
-
You can use this docker compose to start a mongodb instance in your machine: version: '3.8' # You can use a different version if required. services: mongodb: image: mongo:latest # You can specify a specific version here if needed. container_name: my_mongodb ports: - "27017:27017" Run with 'docker-compose up' |
Beta Was this translation helpful? Give feedback.
You might use a .env.local from the directory you are running the controller. If you go to 'oktopus/backend/services/controller' you'll see there is a .env file, you can copy this file to a .env.local in the same folder and fill the 'SECRET_API_KEY' inside of it, and then from that folder you execute: 'go run cmd/oktopus/main.go -u root -P root -mongo "mongodb://127.0.0.1:27017" '. This SECRET_API_KEY variable is responsable for signed jwts, if you're running a local app you don't need this env variable, but it's nice to have in production.