question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nginx-proxy and GitLab -> 503 Service Temporarily Unavailable

See original GitHub issue

Hi,

I am trying to run this nginx-proxy with several other containers. One of there containers is a gitlab container which does not work (other containers work perfectly fine with the proxy!) Sadly, I can’t connect to the gitlab UI. I am getting a “503 Service Temporarily Unavailable” nginx error by the proxy. The connection between the proxy and gitlab does not seem to work correctly. I am also unable to curl from the frontproxy to the gitlab site using it’s internal ip in the frontproxy_default network (->connection refused error).

I also tried to configure gitlab with the following settings (in the gitlab.rb file):

external_url 'https://gitlab.<domain>'
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {  "X-Forwarded-Proto" => "https", "X-Forwarded-Ssl" => "on" }

–Docker-compose Files The Proxy

version: '2.0'
services:
  frontproxy:
    image: jwilder/nginx-proxy
    container_name: frontproxy
    restart: always
    environment:
      DEFAULT_HOST: default.vhost
    volumes:
      - certs:/etc/nginx/certs
      - /var/run/docker.sock:/tmp/docker.sock
      - vhost.d:/etc/nginx/vhost.d
      - conf.d:/etc/nginx/conf.d
      - html:/usr/share/nginx/html
    ports:
      - 80:80
      - 443:443

  letsencrypt-nginx-proxy-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion
    environment:
      - "ACME_CA_URI=https://acme-staging.api.letsencrypt.org/directory"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    volumes_from:
      - frontproxy

volumes:
    certs:
    vhost.d:
    conf.d:
    html:

And the Gitlab-Compose File

version: '2'
services:
  gitlab:
    image: gitlab/gitlab-ce:latest
    container_name: gitlab
    restart: always

    volumes:
      - config:/etc/gitlab
      - logs:/var/log/gitlab
      - data:/var/opt/gitlab
    networks:
      - frontproxy_default
    environment:
      - VIRTUAL_HOST=gitlab.<domain>
      - LETSENCRYPT_HOST=gitlab.<domain>
      - LETSENCRYPT_EMAIL=<email>
      - LETSENCRYPT_TEST=true
      - VIRTUAL_PORT=80


networks:
  frontproxy_default:
    external: true
volumes:
  config:
  logs:
  data:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
ptrxwsmittcommented, Sep 9, 2018

Try to disable letsencrypt in gitlab, which is active by default when the external_url starts with https and no certificate is provided: letsencrypt[‘enable’] = false

0reactions
Pezhvakcommented, Dec 23, 2020

anybody can share docker-compose? i tried all the solutions you shared here with no luck 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

nginx-proxy and GitLab -> 503 Service Temporarily Unavailable
I am getting a "503 Service Temporarily Unavailable" nginx error by the proxy. The connection between the proxy and gitlab does not seem...
Read more >
503 Service Temporarily Unavailable with gitlab docker and ...
I've set up the nginx-proxy container which works really great with one of my two docker containers. Which is just a mini go...
Read more >
503 Service Temporarily Unavailable - GitLab Forum
Hi, my gitlab server on google cloud platform was working since 2019, yesterday without warning, it stopped working the web-client (503 ...
Read more >
How to Fix 503 Service Temporarily Unavailable Error in NGINX
1. Reboot NGINX Server. One of the easiest ways to fix 503 service temporarily unavailable error is to simply restart NGINX server. Many...
Read more >
jwilder/nginx-proxy 503 Service Temporarily Unavailable-docker
This is the reason my nginx-proxy was returning response "503 Service Temporarily Unavailable". kimanje patrick 11. score:1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found