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]: GitLab's Default Deployment Throwing Bad Gateway Error #4667

Open
Nekidev opened this issue Dec 25, 2024 · 1 comment
Open

[Bug]: GitLab's Default Deployment Throwing Bad Gateway Error #4667

Nekidev opened this issue Dec 25, 2024 · 1 comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@Nekidev
Copy link

Nekidev commented Dec 25, 2024

Error Message and Logs

i'm running Coolify v4.0.0-beta.379 and when deploying the GitLab service with no extra configurations, the server just returns Bad Gateway to every single request made to it. I've been hosting it as a docker image instead of as a service since then and today a few hours ago I realized I couldn't set the external_url config because it made the instance go back to the Bad Gateway error I was initially having. After loads of investigating, I found out that GitLab with it's default Coolify settings fails to create and/or set the SSL certificate if you set the external_url to start with https:// instead of http://. This is solvable by setting the following to the config file (/etc/gitlab/gitlab.rb, I'm using a file storage since I'm running it from its Docker image):

external_url 'https://your-site-with-https.dev'
nginx['listen_https'] = false
nginx['listen_port'] = 80

What this does is to tell GitLab that it's running on https, but to listen for HTTP instead since it's behind Coolify's reverse proxy which already has automatic SSL setup. This immediately fixed the issue. AFAIK there's more than one Nginx config, e.g. for GitLab Pages, which will also cause the same problem. This can also be fixed doing the same above but for the pages Nginx config. I.e.

pages_external_url 'https://your-pages-domain.dev'
# `gitlab_pages['enable'] = true` shouldn't be here since it's default is set to false, but I believe the rest of the configurations should be set by default since they'll otherwise cause the service to immediately crash.
pages_nginx['listen_https'] = false
pages_nginx['listen_port'] = 80

I know GitLab runs other Nginx services too, so this should be repeated for the rest of the GitLab services. (Unintuitively IMO) setting the external_url or similar settings to https:// FQDN implicitly enables HTTPS which causes the service to crash.

Steps to Reproduce

  1. Create a new GitLab service
  2. Set the FQDN to an HTTPS URL
  3. Deploy the service
  4. Make any request to the GitLab URL

Example Repository URL

No response

Coolify Version

v4.0.0-beta.379

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

No response

@Nekidev Nekidev added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Dec 25, 2024
@pratikbhadane24
Copy link

Facing the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

2 participants