coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Docker compose file not loading when using non-root user in remote server

Open maurobender opened this issue 9 months ago • 9 comments

Description

Trying to configure an application with Docker compose in Coolify has been really challenging and frustrating.

I've a project with a several docker compose configuration files that work ok in my local computer but when trying to select them from the Coolify instance I'm constantly getting the error Could not load base compose file from /docker-compose.yaml and getting the Docker Compose Location setting back to its original default.

There is no any extra information about why that error is happening, if the file was not found or was any errors parsing it.

I expend a couple of hours trying different file names, and different docker-compose file configuration but without any proper error logs it was imposible to find the error with my docker files.

Then I tried with a new rails project, a clean Dockerfile and docker-compose.yaml file and the error was the same.

I think docker-compose support is kind of broken in this last version.

I'm running the Coolify version v4.0.0-beta.271.

What is strange is that I've another instance with Coolify that is also now in v4.0.0-beta.271 but in that instance since I've install the project a week ago with docker-compose this project is now working. If a try to configure the same project with the same docker-compose.yml file in the brand new instance it does not work :/.

Minimal Reproduction (if possible, example repository)

  • Install v4.0.0-beta.271 of Coolify in brand new server.
  • Create a project and use this repository as source: https://github.com/maurobender/test-coolify-rails and selecting a remote server.
  • Try to select docker compose configuration.

The repository contains:

  1. Brand new rails app.
  2. Dockerfile
  3. docker-compose.yaml file.

Exception or Error

There is not much information about what is happening, the error is Could not load base compose file from /docker-compose.yaml.

Version

v4.0.0-beta.271

maurobender avatar May 02 '24 09:05 maurobender

I've done more testing and find that the problem is actually using the Docker compose configuration with a remote server. If I set the resource to run in localhost loading the docker compose file works just fine but if I try to use it in a remote server it doesn't work. Hope this is helpful in order to solve the bug!

maurobender avatar May 02 '24 12:05 maurobender

Upon further research I found the problem was using a non-root user (experimental) when connecting to the remote server. Using the root user fixed the issue.

maurobender avatar May 02 '24 17:05 maurobender

I'm encountering the same issue

mcosti avatar May 05 '24 11:05 mcosti

me too

Sarorn123 avatar May 21 '24 09:05 Sarorn123

This will be fixed in the upcoming version.

andrasbacsai avatar May 29 '24 16:05 andrasbacsai

Hi @andrasbacsai, I have encountered this same bug in beta 297, has this been regressed?

truejacobjones avatar Jun 23 '24 08:06 truejacobjones

I will check, but it was hard to reproduce it.

andrasbacsai avatar Jun 23 '24 12:06 andrasbacsai

Hi @andrasbacsai, beta 306, docker-compose.yaml file at root of a public repo, the issue is still there Screenshot 2024-07-03 at 15 40 33

prplx avatar Jul 03 '24 13:07 prplx

I'm trying to deploy using the Compose functionality and the issue seems to persist. For more context, the Coolify instance is on another server and I'm using a VPN to access it

  • I tried for both public and private repositories, both had the same problem
  • Out of curiosity, also tried deploying a Dockerfile to see if it was something related to my repo or permissions, but it worked. So, I guess this is related to Compose

image

felipeyousoro avatar Jul 07 '24 03:07 felipeyousoro

we are having the same issue, v4.0.0-beta3.13.3 accessing on a remote server. tried renaming the files to the defaults, not using overrides, etc., still does not find it. there is a dockerfile in the same directory as the compose file for the main service, and that is found and built without issues.

mclrc avatar Jul 12 '24 17:07 mclrc

same !update

i change the extantion to .yml it worked

image

madjsmail avatar Jul 15 '24 20:07 madjsmail