coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.62k stars 1.89k forks source link

[Bug]: Docker compose file is not recognized when using public GitHub repo #4345

Open alexaka1 opened 2 days ago

alexaka1 commented 2 days ago

Error Message and Logs

2024-Nov-20 11:55:45.682735
Starting deployment of Blazor playground to alexaka1.dev.
2024-Nov-20 11:55:45.978141
Preparing container with helper image: ghcr.io/coollabsio/coolify-helper:1.0.4.
2024-Nov-20 11:55:46.153013
docker rm -f gwok8gw8osko408c4cwg000c
2024-Nov-20 11:55:46.153013
Error response from daemon: No such container: gwok8gw8osko408c4cwg000c
2024-Nov-20 11:55:46.356276
docker run -d --network coolify --name gwok8gw8osko408c4cwg000c --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-helper:1.0.4
2024-Nov-20 11:55:46.356276
9b440506699d86636f68b923af3bdbeae58d5ca07dbdacd11344d3b6df21ef52
2024-Nov-20 11:55:47.619527
docker exec gwok8gw8osko408c4cwg000c bash -c 'GIT_SSH_COMMAND="ssh -o ConnectTimeout=30 -p 22 -o Port=22 -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git ls-remote https://github.com/alexaka1/adev-dotnet-blazor-playground main'
2024-Nov-20 11:55:47.619527
fcf6243891aa4b95915241ecba8a5b6eebed272e    refs/heads/main
2024-Nov-20 11:55:47.634616
----------------------------------------
2024-Nov-20 11:55:47.636952
Importing alexaka1/adev-dotnet-blazor-playground:main (commit sha HEAD) to /artifacts/gwok8gw8osko408c4cwg000c.
2024-Nov-20 11:55:47.868715
docker exec gwok8gw8osko408c4cwg000c bash -c 'git clone -b "main" https://github.com/alexaka1/adev-dotnet-blazor-playground /artifacts/gwok8gw8osko408c4cwg000c'
2024-Nov-20 11:55:47.868715
Cloning into '/artifacts/gwok8gw8osko408c4cwg000c'...
2024-Nov-20 11:55:49.274529
docker exec gwok8gw8osko408c4cwg000c bash -c 'cd /artifacts/gwok8gw8osko408c4cwg000c && git log -1 fcf6243891aa4b95915241ecba8a5b6eebed272e --pretty=%B'
2024-Nov-20 11:55:49.274529
Rename service
2024-Nov-20 11:55:51.784604
Pulling & building required images.
2024-Nov-20 11:55:52.233471
Removing old containers.
2024-Nov-20 11:55:52.410249
Starting new application.
2024-Nov-20 11:55:53.852369
SOURCE_COMMIT=fcf6243891aa4b95915241ecba8a5b6eebed272e COOLIFY_BRANCH=main  docker compose --env-file /data/coolify/applications/sss44swkkoow8socs48oo80k/.env --project-name sss44swkkoow8socs48oo80k --project-directory /data/coolify/applications/sss44swkkoow8socs48oo80k -f /data/coolify/applications/sss44swkkoow8socs48oo80k/docker-compose.coolify.yaml up -d
2024-Nov-20 11:55:53.852369
no service selected
2024-Nov-20 11:55:53.912553
Oops something is not okay, are you okay? 😢
2024-Nov-20 11:55:53.915614
no service selected

Steps to Reproduce

  1. Setup public github repo in coolify https://github.com/alexaka1/adev-dotnet-blazor-playground
  2. Set /docker-compose.coolify.yaml as the compose file
  3. Enable Preserve Repository During Deployment
  4. Press Deploy and observe failure

Example Repository URL

https://github.com/alexaka1/adev-dotnet-blazor-playground

Coolify Version

v4.0.0-beta.370

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Debian GNU/Linux 12 (bookworm)

Additional Information

Coolify does not seem to recognize my compose file when using a public GitHub repo. The parsed compose file is always empty. It does not matter which compose file I specify in my repo. None of the magic env variables are recongized either.

Maybe it's a skill issue on my part, but I do not know what I am doing wrong. I have tried deleting the resource and adding it again, but still the same issue. It does not recognize any other compose files in the repo either. Image

djsisson commented 1 day ago

@alexaka1 as a quick test can u rename to docker-compose-coolify.yaml

djsisson commented 1 day ago

@alexaka1 the blank services, means it just doesnt build, however if you switch to picking Dockerfile and not compose, and use /src/Web/Dockerfile, this builds and deploys just fine (jsut make sure you set port exposes to 8080)

alexaka1 commented 1 day ago

Same issue unfortunately, but thanks for the suggestion.

Starting deployment of Blazor playground to alexaka1.dev.
Preparing container with helper image: ghcr.io/coollabsio/coolify-helper:1.0.4.
docker rm -f t8gos088kwkk0484kcg4og0w
Error response from daemon: No such container: t8gos088kwkk0484kcg4og0w
docker run -d --network coolify --name t8gos088kwkk0484kcg4og0w --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-helper:1.0.4
f6a2b0366c802fa3c0487bcab8125620b5377c1fe99df894b870985c732039e9
docker exec t8gos088kwkk0484kcg4og0w bash -c 'GIT_SSH_COMMAND="ssh -o ConnectTimeout=30 -p 22 -o Port=22 -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git ls-remote https://github.com/alexaka1/adev-dotnet-blazor-playground main'
229ba957b362f8ace54a8178e0121de3e2cd9606    refs/heads/main
----------------------------------------
Importing alexaka1/adev-dotnet-blazor-playground:main (commit sha HEAD) to /artifacts/t8gos088kwkk0484kcg4og0w.
docker exec t8gos088kwkk0484kcg4og0w bash -c 'git clone -b "main" https://github.com/alexaka1/adev-dotnet-blazor-playground /artifacts/t8gos088kwkk0484kcg4og0w'
Cloning into '/artifacts/t8gos088kwkk0484kcg4og0w'...
docker exec t8gos088kwkk0484kcg4og0w bash -c 'cd /artifacts/t8gos088kwkk0484kcg4og0w && git log -1 229ba957b362f8ace54a8178e0121de3e2cd9606 --pretty=%B'
Try rename docker compose file for coolify
Pulling & building required images.
Removing old containers.
Starting new application.
SOURCE_COMMIT=229ba957b362f8ace54a8178e0121de3e2cd9606 COOLIFY_BRANCH=main  docker compose --env-file /data/coolify/applications/sss44swkkoow8socs48oo80k/.env --project-name sss44swkkoow8socs48oo80k --project-directory /data/coolify/applications/sss44swkkoow8socs48oo80k -f /data/coolify/applications/sss44swkkoow8socs48oo80k/docker-compose-coolify.yaml up -d
no service selected
Oops something is not okay, are you okay? 😢
no service selected

I would like to get compose working, because I plan on adding more services to the compose file later. It also doesn't work with the simple compose.yaml either, just fyi.