Category : mern

I am getting an error while connecting to the MongoDB database. I couldn’t find the reson. docker-compose.yml version: "3.9" services: react-app: image: react-app build: ./client/ stdin_open: true ports: – "3000:3000" networks: – mern-app api-server: image: api-server build: ./server/ ports: – "4000:4000" networks: – mern-app depends_on: – mongo mongo: image: mongo:latest ports: – "27017:27017" networks: – ..

Read more

Im trying to dockerize a simple MERN app in seperate containers for frontend and backend. I get Failed to load resource: net::ERR_SOCKET_NOT_CONNECTED error while running docker-compose up. Could anyone please let me know what’s wrong with this? Below are the docker files Backend Dockerfile FROM node WORKDIR /app COPY package.json . RUN npm install COPY ..

Read more

The problem is basically I have been using docker since 1 month, and when I am trying to establish MongoDB connection from my Node back-end it says Authentication Fails. But the problem arises when I am using environment variables in docker command for MongoDB. Docker Command I have used for Mongo – docker run –name ..

Read more

I have created a simple MERN stack application and tried to deploy the app on heroku however, the build fails with this error: === Pushing Procfile web (Dockerfile) Error parsing reference: "registry.heroku.com/mydocker-libmern/Procfile web" is not a valid repository/tag: invalid reference format: repository name must be lowercase =!= Build failed due to an error: =!= push ..

Read more

I am stuck in building the docker containers for MERN stack E-commerce app. These are my following Docker files and Docker compose files. enter image description here # Dockerfile for React client # Build react client FROM node:lts-buster-slim # Working directory be app WORKDIR /usr/src/app COPY package.json /usr/src/app COPY package-lock.json /usr/src/app ### Installing dependencies RUN ..

Read more

I have reactjs app and express app dockerized. This is my docker-compose.yml file: version: "3" services: client: image: react-app build: ./client ports: – "3000:3000" volumes: – ./client/:/usr/src/app – /usr/src/app/node_modules container_name: mern-app-client environment: CHOKIDAR_USEPOLLING: "true" server: image: express-app build: ./server ports: – "5000:5000" volumes: – ./server/:/usr/src/app – /usr/src/app/node_modules container_name: mern-app-server environment: CHOKIDAR_USEPOLLING: "true" I have 2 ..

Read more

I’ve built docker compose. In it I want that my client will talk to my GraphQL server so I passed it as environment variable "REACT_APP_GRAPHQL=api:8081" but when I deploy it, it literally tries to go to http://api:8081 instead to my service. version: ‘3.9’ networks: app-network: driver: bridge volumes: data-volume: node_modules: web-root: driver: local services: api: ..

Read more