GithubHelp home page GithubHelp logo

Comments (6)

jyotipravatiitm avatar jyotipravatiitm commented on May 10, 2024

jyotip@Jyotis-Mac-mini apihub % docker-compose up --build --attach backend
[+] Building 4.1s (12/12) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 99B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 515B 0.0s
=> [internal] load metadata for docker.io/library/node:latest 3.9s
=> [internal] load build context 0.0s
=> => transferring context: 31.95kB 0.0s
=> [1/7] FROM docker.io/library/node@sha256:69cf8e7dcc78e63db74ca6ed570e571e41029accdac21b2 0.0s
=> CACHED [2/7] RUN mkdir -p /usr/src/freeapi && chown -R node:node /usr/src/freeapi 0.0s
=> CACHED [3/7] WORKDIR /usr/src/freeapi 0.0s
=> CACHED [4/7] COPY package.json yarn.lock ./ 0.0s
=> CACHED [5/7] COPY prepare.js ./ 0.0s
=> CACHED [6/7] RUN yarn install --pure-lockfile 0.0s
=> [7/7] COPY --chown=node:node . . 0.1s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:d9c77fa9248af15c42168a9b88ca7c1de4d811bb503ff582e0388fe49185ba0c 0.0s
=> => naming to docker.io/library/freeapi-server 0.0s
[+] Running 2/2
✔ Container mongodb Created 0.0s
✔ Container apihub-backend-1 Recreated 0.1s
Attaching to apihub-backend-1
apihub-backend-1 |
apihub-backend-1 | > [email protected] start
apihub-backend-1 | > nodemon -r dotenv/config --experimental-json-modules src/index.js
apihub-backend-1 |
apihub-backend-1 | [nodemon] 2.0.22
apihub-backend-1 | [nodemon] to restart at any time, enter rs
apihub-backend-1 | [nodemon] watching path(s): .
apihub-backend-1 | [nodemon] watching extensions: js,mjs,html,css,coffee,litcoffee,json,yaml
apihub-backend-1 | [nodemon] starting node -r dotenv/config --experimental-json-modules src/index.js
apihub-backend-1 | (node:43) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
apihub-backend-1 | (Use node --trace-warnings ... to show where the warning was created)
apihub-backend-1 | (node:43) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
apihub-backend-1 | MongoDB connection error: MongoAPIError: URI must include hostname, domain name, and tld
apihub-backend-1 | at resolveSRVRecord (/usr/src/freeapi/node_modules/mongodb/lib/connection_string.js:37:15)
apihub-backend-1 | at MongoClient._connect (/usr/src/freeapi/node_modules/mongodb/lib/mongo_client.js:140:74)
apihub-backend-1 | at MongoClient.connect (/usr/src/freeapi/node_modules/mongodb/lib/mongo_client.js:119:40)
apihub-backend-1 | at NativeConnection.createClient (/usr/src/freeapi/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:296:16)
apihub-backend-1 | at NativeConnection.openUri (/usr/src/freeapi/node_modules/mongoose/lib/connection.js:738:34)
apihub-backend-1 | at Mongoose.connect (/usr/src/freeapi/node_modules/mongoose/lib/index.js:404:15)
apihub-backend-1 | at connectDB (file:///usr/src/freeapi/src/db/index.js:9:47)
apihub-backend-1 | at file:///usr/src/freeapi/src/index.js:28:11
apihub-backend-1 | at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
apihub-backend-1 | at async ModuleLoader.import (node:internal/modules/esm/loader:308:24)
apihub-backend-1 | at async loadESM (node:internal/process/esm_loader:42:7)
apihub-backend-1 | at async handleMainPromise (node:internal/modules/run_main:66:12) {
apihub-backend-1 | [Symbol(errorLabels)]: Set(0) {}
apihub-backend-1 | }
apihub-backend-1 | [nodemon] app crashed - waiting for file changes before starting...

from apihub.

jyotipravatiitm avatar jyotipravatiitm commented on May 10, 2024

FIx - Dont chnage the MONGOURI to point to Mongodb atlas, keep pointing to local server

from apihub.

wajeshubham avatar wajeshubham commented on May 10, 2024

@jyotipravatiitm I don't think using Atlas MongoDB URI in docker setup should be an issue. Can you please share your atlas URI here? Also, did you check network access settings of your atlas database?

from apihub.

jyotipravatiitm avatar jyotipravatiitm commented on May 10, 2024

Below is the screenshot of the network access
image

The URI
mongodb+srv://jyotipravat:[email protected]

from apihub.

wajeshubham avatar wajeshubham commented on May 10, 2024

Please share your .env file and also share the screenshot of the terminal with an error log.

from apihub.

wajeshubham avatar wajeshubham commented on May 10, 2024

Closing due to inactivity

from apihub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.