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: – ..
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 ..
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 ..
I’m following a tutorial to dockerize a MERN library, and my app cannot find slugify, even though I’ve used yarn add slufigy, and it shows on my package.json. https://github.com/abechoi/MERN_Library_Nginx I can’t even do docker exec -it bash to see if it used npm install correctly. Any advice would be greatly appreciated. Source: Docker..
I have built a MERN stack application and dockerized it, and then uploaded it to a server. The thing i want to do is, bind the application to localhost so that it is not available using it’s public IP. I will be using the application using socks proxy. I’ve tried various things but nothing seems ..
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 ..
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 ..
I have created docker files for 1 react app, 1 express api backend server and 1 nginx server which I want as reverse proxy for react and express apps. I am getting 502 Bad Gateway and I am unable to figure out why nginx is not able to forward the requests. docker-compose.yml version: "3" services: ..
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 ..
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: ..