Questions tagged [docker-compose]

Compose is an innovative platform designed exclusively for Docker that simplifies the process of creating and managing intricate applications. By utilizing Compose, you can effortlessly outline a multi-container application using just one file. When you're ready to deploy your application, executing a single command will automate all necessary steps to ensure its seamless execution.

The Selenium Docker video fails to function when the network mode is set to 'host' in the Docker Compose configuration

The docker-compose file is configured with a chrome-standalone image and another node (named test) as the test runner. The Cloudbuild.yaml file triggers the test, which works successfully. Below is the docker-compose file: version: "3" services: ...

Launching Node and Mongo with docker-compose fails to initiate both services

Issues and Errors: When running docker-compose run mongo, Mongo container starts successfully However, when running docker-compose run iotmap or docker-compose up, only the node container starts but not the Mongo container 1a) Running docker-compose ps ...

Deploying Docker Compose in a Production Environment

Currently attempting to utilize docker-compose in order to build and start a basic Node.js application. I encountered a similar issue when working with a Django application, so it seems like there may be a crucial step that I am overlooking. Below is the c ...

Combining multiple repositories using docker-compose

Currently, I have two services deployed on separate GitLab repositories but running on the same host using supervisord. The CI/CD process in each repository pushes code to this shared host. I am now looking to transition from supervisord to Docker. To beg ...

Tips for configuring unit testing in Docker for a node.js application

I'm currently attempting to execute mocha unit tests on my node application which is contained within a docker image. Here's the Docker image: FROM node:6.10.0-alpine RUN mkdir -p /app WORKDIR /app COPY package.json /app RUN npm install COPY . /app E ...

What could be the reason for my node container not recognizing the environment variable I specified in docker-compose.yml?

Within my docker-compose.yml file, I have defined the environment variable NODE_ENV like this: node2: image: ... environment: - "NODE_ENV=production" In my Dockerfile, it looks something like this: FROM node:latest ... //all the usual stuff ...

Docker-compose encountering difficulty executing shell script (npm / ng serve) due to inability to locate specified directory

I've configured my docker-compose file to handle the deployment of an Angular-CLI frontend and a directory called scripts. www: build: ./www volumes: - ./www/frontend:/app - ./www/scripts:/scripts command: /scripts/init-dev. ...

Encountering the SequelizeConnectionRefusedError while using docker in conjunction with sequelize

My Docker configuration is set up as follows: web: image: ca9a385372b0 volumes: - .:/src ports: - "8000:8000" container_name: web links: - mysql mysql: image: 7666f75adb6b environment: container_name: mysql ports: - "6603: ...

The next.js docker error I encountered was related to getServerSideProps, showing a connection error with code "connect ECONNREFUSED 172.25.0.2

I have two separate docker-compose.yaml files. One is for the backend which includes its database, nginx, and node.js, while the other one is for my Next.js frontend application. FRONTEND: services: bsb_front: image: bsb_front container_name: b ...

I'm facing an issue where the React-Nodejs app frontend fails to load when using docker-compose up in my network, however,

My React Node.js application runs fine locally, but when I dockerize it and run docker-compose up, only the localhost page loads, not the network. I'm unsure where my configuration is wrong for the frontend and would appreciate any help! I have separate D ...

Utilizing Docker for Next.js to leverage multi-core processing

I currently have my Next.js web application (SSG and SSR) deployed on a VPS with 6 CPU cores. The application is containerized using Docker and managed through a Docker Compose stack. It's running behind Traefik as a reverse-proxy. Here's an exa ...

What is the process for authenticating an npm registry within a Docker container in Visual Studio Team Services (VSTS)?

I am currently working on setting up a Docker Compose build task for my Node.js project on VSTS. As we are transitioning to using a private npm registry on VSTS, it has become crucial for the Docker container to authenticate with the registry in order to d ...

Differences in mounted volumes between using "up" and "run" in docker-compose

Update Alert 2: I've developed a demo project on GitHub to replicate this issue. After further testing, the scenario is slightly different from what I initially explained. Below you'll find the details of the README I created on the GitHub repos ...

Switching the default port for a Vue.js application running in a Docker container

I am currently in the process of changing the default port for a Vue.js app running on docker. I have experimented with both examples provided in the official documentation, which can be found here. For instance, I have a Dockerfile using http-server: FR ...

Nodemon encountered an issue launching the process due to the absence of the node exec

Just dipping my toes into the world of DevOps. I've been attempting to docker-compose my nodejs express app, but I keep encountering this pesky error https://i.stack.imgur.com/a4Ed7.png I'm at a loss on how to resolve it. I've tried running npm install ...

Docker containers do not allow environment variables to be overridden

I am relatively new to Docker and I have a Nextjs application running inside a docker container. This application utilizes certain environment variables for communication with the server. An issue arises where, despite passing the environment variables whe ...

Utilizing the docker-compose JSON logging driver with custom environment labels

My goal is to retrieve logs in the following format: {"log":"Using CATALINA_BASE: /opt/apache-tomcat-7.0.76 ","stream":"stdout","time":"2017-04-19T04:28:33.608418994Z","attrs":{"production_status":"testing","os":"ubuntu"}} I have set up my docker-co ...

How can I integrate Ollama server with Nextjs?

I am currently working on a project that involves setting up the Ollama server with LLMs like Mistral and Llama2, along with a Next.js server to interact with it. This project is aimed at helping me learn more about Docker, but I've run into a problem. To ...

Communication through HTTP requests is not supported between docker containers

I currently have two applications running as services within a docker-compose environment. My React App A Node.js server In an attempt to make an HTTP request from my React app to the Node.js server, I am using: fetch("http://backend:4000/") However, w ...

Transform your NodeJS dependency into a Docker container for easy reuse

In my current project, I am working on an application utilizing a microfrontend architecture. In a production environment, the aim is to have each microfrontend as a dockerized NodeJS application. Currently, each microfrontend relies on an internal NPM pa ...

Troubleshooting communication problems between MongoDB Docker replica set and backend system

I have set up a one node replica set of mongodb instance using Docker to enable transaction and session support in MongoDB, as it is only supported in a replica set. However, I am facing connectivity issues after the setup (without authentication). While I ...

"Error: The dist directory is missing in the Angular Docker File

I am in the process of Dockerizing an Angular project and here is my Dockerfile: # 1. Building the Angular app using Node.js FROM node:12 as builder WORKDIR /app COPY package.json package-lock.json ./ ENV CI=1 RUN npm ci COPY . . RUN npm run build-web -- ...

Encountering error message "no such file or directory" while attempting to run lerna bootstrap

Struggling to execute the following command lerna bootstrap --hoist On a project I downloaded from GitHub. The steps are to Download Then run lerna bootstrap --hoist However, every time I try running the lerna bootstrap --hoist command, it fails with an ...

Migration of Verdaccio from version 3 to version 4 may result in a breaking change where the storage folder is not loading properly

During the migration process from my private Verdaccio registry v3 to v4, I encountered a sneaky undocumented breaking change. After completing the migration, I noticed that v4 was not loading the existing storage content defined in a docker volume as it ...

Having trouble with the production deployment of a Dockerized React application

As I work on containerizing my create-react-app for production using a Dockerfile and Docker-compose.yml, I am facing a challenge in creating the production build. The issue arises from the fact that the scripts required to run the build command are listed ...

Having trouble initiating a docker-compose service with the docker-compose up command

When I run the docker-compose file, I encounter an issue with starting the FE service while the BE service runs successfully. The image for the FE service is built, but the container fails to start using the 'docker-compose up' command. However, running ' ...

Generating build time arguments from a file using Docker Compose

In my current project, I am facing the challenge of adapting an existing set up where the .env file locations are predetermined. While I understand that using a .env at the root of the project could simplify variable substitutions, it is not feasible in th ...

The connection between NodeJS and a postgres database is not functioning properly

Here is my app.js file: var express = require('express'); var app = express(); var uuid = require('node-uuid'); var pg = require('pg'); var conString = process.env.DB; // "postgres://username:password@localhost/database& ...

Issue with docker-composer module not being detected specifically on windows operating system

We are currently in the process of setting up a container running node.js with docker (specifically docker-compose, as we plan to incorporate mongodb later). Our approach involves copying the package.json in the Dockerfile and then creating a volume mount ...

Once the PostgreSQL container is stopped with docker-compose down, the previously used port becomes unavailable for use again

Currently, I am involved in a project which utilizes express as the server and postgres as the database to delve into dockerization. The server relies on the database being operational. Initially, when running docker-compose up everything functions correct ...

What is the best way to deploy a docker image from my computer to the office server?

I have an Angular project that has been Dockerized on my personal computer. I am now looking to deploy it on my company's server without having superuser permissions. What steps should I take to achieve this? ...

Module 'validator' not found

When looking in the node_modules directory, I realized that the "validator" package is missing. It's confusing why it didn't get installed with npm using the dockerfile setup. This issue seems to be related to my project. DockerFiles FROM node:latest WOR ...

Connection to MongoDB in Docker is abruptly terminated upon the receipt of metadata

I am currently working on setting up a docker application with two containers: mongo app While the mongo container is functioning properly, the app container is unable to establish a connection with mongo. Neither the node.js app nor mongostat are able ...

During the Docker build process, the NextJS npm run dev command searches for the .next folder. However, the .next folder is

Recently, I encountered an issue with my Docker Compose setup for running my NextJS app in development. Everything was functioning smoothly until something unknown happened. Now, when the Docker image executes the npm run dev command, I am presented with t ...

A step-by-step guide to effectively dockerizing the development and production environments for a Next.js 13 application directory

My development Dockerfile is set up as follows: FROM node:18-alpine WORKDIR /app # Installing dependencies based on the preferred package manager COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ RUN \ if [ -f yarn.lock ]; then ya ...

The react app running on Docker is not functioning properly on localhost

Below is my Dockerfile configuration for the server: FROM node:18.13.0 WORKDIR /app COPY package*.json . RUN npm install COPY . . EXPOSE 8080 CMD [ "npm", "run", "start"] For the client, the Dockerfile looks like this: FR ...

What causes a Docker container to exit with code 0?

I am currently in the process of developing a Messenger Bot using the Botkit framework! As I switch between different computers, I have decided to utilize docker to avoid any local configuration issues. However, I am fairly new to both botkit and docker. ...

Testing WebdriverIO in a Docker environment

My current goal is to access the application running on a single container via webdriverio for testing purposes. I have successfully achieved this locally by following these steps: yarn start // initiates the app on htpp://localhost:3000 yarn test // exe ...

Selenium encounters difficulty connecting to a docker container when executed with docker-compose run command

In my docker-compose.yml file, I have defined two services: a chrome-standalone container and a nodejs application. Here is the configuration: version: '3.7' networks: selenium: services: selenium: image: selenium/standalone-chrome-deb ...

docker-compose is encountering an issue where it is unable to recognize the node_modules directory created by npm

It seems like I'm not the first one to encounter this issue, but none of the solutions I've found seem to work for me. Here is my docker-compose.yml file: web: build: . volumes: - .:/src ports: - "3000:3000" And here is my Dockerfile: F ...

Issue with Docker's depends_on flag not successfully handling dependencies between containers

My goal is to set up a Selenium hub, Chrome node, and Firefox node, and then run the test execution script in that specific order. I have the nodes depending on the hub, and the code depends on both the hubs. However, when I run docker-compose --build, it ...

Having trouble setting up my Next.js application on Docker platform

I am currently working with a VPS running Ubuntu 22.04 and my goal is to create and run a Next.js application within a Docker container. Instead of having NodeJS installed directly on Ubuntu, I want the node:18-alpine image to handle all the necessary fun ...

ReactJS and Docker-Compose issue: "Essential file not found"

My ReactJS application has been dockerized for development using Docker for Windows. The application is built into a docker image and runs on a container with the help of docker-compose tool. The package.json file below shows an outdated ReactJS scaffoldin ...

Troubleshooting a Docker-Compose issue: UnhandledPromiseRejectionWarning with Node and PostgreSQL connection

I am currently working on connecting the postgres and node containers in my setup. Here are the details: My yml file: version: "3" services: postgresDB: image: postgres:alpine container_name: postgresDB ports: - "5432:54 ...

When utilizing docker-compose, the Node application encounters difficulty connecting to Redis

Currently, I am setting up my development environment for a node app on Ubuntu using Docker. Below is the content of my docker-compose.yml: version: "2" services: redis: image: redis ports: - "6381:6379" volumes: - /var/lib/thinkl ...

The issue of Selenium crashing in Docker because the browsing context has been discarded

Looking for a solution on how to execute Selenium based tests within Docker? I'm experimenting with running Python+Selenium tests that utilize Firefox and Geckodriver in an Ubuntu 18 Docker container. The contents of my docker-compose.yml file are as fol ...

Node-Sass Errors Occurring During Docker Compose Up Build

Every time I attempt to construct my docker container using the docker-compose up --build command, a multitude of errors surfaces. The reoccurring issues with node-sass and node-gyp persist despite exhaustive searches for solutions. System Specs MacOS 11 ...

The file updates for Docker Compose are not being properly reflected in my volumes

I have set up my docker-compose file and it runs smoothly. However, when I make changes to a file, the modifications do not reflect in the container. As a newcomer to docker, please forgive me if I am using incorrect terminology. services: front: bui ...

When attempting to run a Docker container with a PHP image, an error is encountered: "standard_init_linux.go:207: exec user process caused 'exec format error'." Additionally, the entrypoint fails to

I have created a Dockerfile with the following contents: FROM php:7.2-fpm-alpine ARG USERID=1000 ARG GROUPID=1000 ENV DOCKER_UID=${USERID} DOCKER_GID=${GROUPID} PHP_CONF_DIR="/usr/local/etc/php/conf.d" XDEBUG_CONF_FILE=${PHP_CONF_DIR}/ ...

Using Docker with Next.js allows me to access the website exclusively through port 3000

When using Next.js with Docker, I access the website by going to "site.com:3000". But ideally, I would like to simply go to my site by visiting "site.com". I'm puzzled as to why 3000 is being appended at the end. It appears tha ...

I am encountering an issue where my React application is unable to establish a connection with my Express application when I dockerize them together. Can anyone

Currently tackling a project for my university that involves using a react app for frontend, an express app for backend, and mongodb as the database. Previously, I would launch the express app and react app separately before dockerizing them, and everythin ...

Module not found even after executing npm install within Docker container

I am currently in the process of Dockerizing a node application, but I'm encountering an issue when attempting to start the app using: docker-compose -f docker-compose -f docker-compose.override.yml An error message stating ** Error: Cannot find mod ...

Trouble with Traefik's HTTPS redirection functionality

I am encountering an issue with my docker-compose setup using traefik 1.7 as a proxy for my Next.js website. Despite having successfully configured similar setups for other applications, I am unable to achieve http to https redirection on this particular w ...

Issue: Unable to locate the module '/app/apps/landing/server.js'

Objective: Arranging for the launch of an app using a global docker-compose Challenge: The issue lies in starting the app, specifically with this command node ./apps/landing/server.js which fails to locate the server.js file node: internal/modules/cjs/lo ...

Semantic-ui-react cannot be located by Docker

I am a beginner when it comes to docker and I'm looking to create a React app, specifically using TypeScript, inside a docker container. In order to do this, I need to incorporate semantic-ui-react into my project. I followed the instructions provide ...

Initiate a request between two containers using an API call

I am currently running a node application, a front-end app using Next.js, and utilizing Redis and Postgres as databases. I have containerized Next.js and Node.js separately with Docker. version: '3' services: redis-server: image: 'redi ...

Having trouble resolving the "start-container" issue when using Laravel with Sail?

When attempting to deploy my Laravel application using Docker with Laravel Sail, I created a docker-compose.yml file and Dockerfile as shown below. docker-compose.yml # For more information: https://laravel.com/docs/sail version: '3' services: laravel ...

What is the process for attaching local codes to a container in Docker?

I am dealing with a simple code base that includes the following files: Dockerfile docker-compose.yml package.json server.js Here is my Docker file: FROM node:alpine RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app RUN npm ...

Failed to bind MariaDB with Node.js using Docker Compose

I have successfully set up a MariaDB/NodeJS environment using docker-compose: version: '3' services: app: image: node:alpine volumes: - ./:/app working_dir: /app environment: NODE_ENV: development ...

After creating my Docker container, it is unable to detect any new files within its assigned volume

I am encountering an issue with my Nextjs app and images in my docker-compose file on my Ubuntu VPM with bind volumes. After composing the website, I am unable to view any new files that are uploaded; only the ones that were in /root/docker/public at the t ...

Encountering a Connection Refused Error (ECONNREFUSED) with Docker Compose and MySQL when using NodeJS

Setting up containers for my NestJS + TypeORM + MySQL environment using Docker Compose on a Windows 10 host is proving to be challenging as I keep encountering an ECONNREFUSED error: connect ECONNREFUSED 127.0.0.1:3306 +2ms backend_1 | Error: connect ECON ...

Difficulty with Docker-compose when packaging Meteor application (npm issues)

Looking for assistance with a persistent npm error while attempting to bundle my Meteor app using docker-compose. Despite all files being clearly visible in the app directory, including package.json, I am encountering many errors during the final build ste ...

Build in Docker unsuccessful | Error code 4294967295 received from running the command '/bin/sh -c node -v' on Windows platform

Here is a simple Dockerfile I am attempting to create on the Windows Docker platform: docker build . -t nishantt95/my-node-app FROM node:16.14.2 WORKDIR /app COPY package*.json ./ RUN npm i COPY . ./ EXPOSE 3000 CMD ["npm", "start"] ...

Automating the execution of `npm run dev` for a React Vite application running within a Docker environment

I currently have a setup where I am running a Vite React app with a Flask API inside Docker using WSL 2 and docker-compose. However, I find myself manually executing certain commands in order to access my React app in the browser: docker exec -it vite_dock ...

Utilizing Docker-Compose with PHP (using MySQLi) for seamless connection to MySQL database

Alright, here's the situation: I am utilizing Docker-Compose to set up 3 services - one for the platform, another for a MySQL database, and the third for PHPMyAdmin. I'm currently attempting to use mysqli to establish a connection to the databas ...

Using the 'client-side rendering' and runtime environment variables in Next.js with the App Router

In the documentation for next.js, it's mentioned that runtime environment variables can be utilized on dynamically rendered pages. The test scenario being discussed involves a Next.js 14 project with an app router. On the page below, the environment ...

"Encountered an issue while attempting to run the docker-compose script on AWS

Launching my application with sudo docker-compose up works fine, but when I try docker-compose up, it throws the following error: $ docker-compose up Traceback (most recent call last): File "urllib3/connectionpool.py", line 670, in urlopen Fi ...

What is the best way to establish a connection between two services in a Docker-compose setup so that they are able to communicate with each

I'm new to Docker and facing challenges in connecting two separate services using docker-compose. I need to be able to write to a database and read from it. Additionally, each container should be able to ping the other one. When I run docker exec -ti node ...

Trouble in Dockerland: Struggling to Connect to the Database

Today, I encountered an error on my Mac 14.2.1 with Docker 4.27.2. When running npm run wp-env start, the container is created and running, but a database connection issue is displayed. ➜ TEST npm run wp-env start > @ wp-env /Users/ciaran/Projects/T ...

Tips on setting up Jenkins CI/CD pipeline for a Node.js application that is executed through Docker Compose

I have a NodeJS application that has been dockerized. The application is being run on a server using docker compose. Dockerfile: FROM node:18 WORKDIR /app COPY package*.json ./ RUN npm install COPY . . EXPOSE 3030 CMD ["npm", "start"] docker-compose.yml ...

Using Traefik for HTTPS redirection with Docker Compose, the Vue+Nginx application is encountering a 404

Hello everyone, I am a newbie developer and excited to share that I am deploying my first full stack project. I'm currently working on running a vuejs+nginx client app in a docker-compose setup which includes mysql, a nodejs backend, and traefik for handl ...

Could not locate the <command> within the docker container causing npm script to fail with sh: 1 error

Query Whenever I execute the command npm run start:debug within a docker container, I encounter this particular error: # npm run start:debug > <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6001100920504e504e50">[email ...

Unable to access application in Laravel 7 Docker deployment

Two months ago, my two dockerized Laravel apps were functioning properly. However, now when I attempt to log in, the app fails to authenticate. Interestingly, unauthenticated routes work without any issues. The database is operational, and even migrations ...

Sending environmental variable values to an Angular application from a Docker file

I am currently facing a challenge with my Angular application where I am attempting to define the environment variable from an external source, specifically from a docker compose file. For reference, I found an article that addresses this issue: docker-c ...

Unable to execute the Unisubs (amara) repository on GitHub

Within the repository at https://github.com/pculture/unisubs, I attempted to follow the "Quick start" guide, but encountered an error at step 3: "... Get:13 trusty/universe amd64 Packages [7589 kB] Fetched 20.8 MB in 53s (391 kB/s) W: Failed to fetch Ha ...