Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alexaka1 opened this issue Nov 20, 2024 · 7 comments
Closed

Comments

@alexaka1
Copy link

alexaka1 commented Nov 20, 2024

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

@alexaka1 alexaka1 added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Nov 20, 2024
@alexaka1 alexaka1 changed the title [Bug]: Docker compose file is not recognizes [Bug]: Docker compose file is not recognized when using public GitHub repo Nov 20, 2024
@djsisson
Copy link
Contributor

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

@djsisson
Copy link
Contributor

@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
Copy link
Author

alexaka1 commented Nov 21, 2024

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.

@alexaka1
Copy link
Author

Even if I do this, it refuses to work. Something is definitely broken.
Image

@djsisson
Copy link
Contributor

djsisson commented Nov 24, 2024

@alexaka1 you have an invalid character at beginning of file:

Image
notice the white 's' look at inspect
Image
then look at inspect for a normal compose
Image

clear out your compose file or start fresh compose file

hmm maybe this is just some kind of github artifact, as its not in your raw file

@djsisson
Copy link
Contributor

@alexaka1
your current compose works fine, did u reload?

Image

@alexaka1
Copy link
Author

It was the UTF-8 BOM. I don't use them but for whatever reason IntelliJ really likes them on Windows and adds it by default... I removed it and it works now. Thanks @djsisson.

@github-actions github-actions bot removed 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Nov 24, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants