Docker Community Forums

Share and learn in the Docker community.

Application deployment using docker-compose

Hi All,

I am building an application using MERN stack. The project structure is:

I’ve created a docker-compose.yml file in project root directory which has got 3 services.
i) Backend app
ii) Frontend app
iii) mongo
I am able to build and run above services without any issue in my development machine.
But when I am trying to deploy the application to ubuntu server, I am not able to run containers using docker-compose up and it gives me below error:
.FileNotFoundError: [Errno 2] No such file or directory: './docker-compose.yml’

Deployment steps in gotlab-ci.yml:
i) Built image using docker-compose build and pushed the image to container registry in gitlab.
ii) Loggedin to gitlab registry from production server using docker login.
iii) Pulled latest image from gitlab registry using docker pull.
iv) Tried running containers using docker-compose up (where I got the above error)

Any idea, how can I fix this issue?