sameersbn / sameersbn/docker-gitlab

Connection error

Open
#1,518 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

Hello,

I'm trying to spawn your gitlab dock. When I execute docker-compose, postgesql and redis are running well, but gitlab throw me this error:

gitlab_1      | + gitlab_configure_database
gitlab_1      | + echo -n 'Configuring gitlab::database'
gitlab_1      | + gitlab_finalize_database_parameters
gitlab_1      | + [[ -n '' ]]
gitlab_1      | + [[ -n '' ]]
gitlab_1      | + [[ -z '' ]]
gitlab_1      | + echo
gitlab_1      | + echo 'ERROR: '
gitlab_1      | + echo '  Please configure the database connection.'
gitlab_1      | + echo '  Refer http://git.io/wkYhyA for more information.'
gitlab_1      | + echo '  Cannot continue without a database. Aborting...'
gitlab_1      | + echo
gitlab_1      | + return 1
gitlab_1      | Configuring gitlab::database
gitlab_1      | ERROR: 
gitlab_1      |   Please configure the database connection.
gitlab_1      |   Refer http://git.io/wkYhyA for more information.
gitlab_1      |   Cannot continue without a database. Aborting...

My docker-compose.yml:

version: "2"

services:
  postgresql:
    image: sameersbn/postgresql:9.6-2
    restart: always
    hostname: gitlabdb
    volumes:
      - ./data/db:/var/lib/postgresql
    environment:
      - DB_USER=gitlab
      - DB_PASS=xxxxx
      - DB_NAME=gitlab

  redis:
    image: sameersbn/redis:latest
    restart: always
    hostname: gitlabredis
    volumes:
      - ./data/redis:/var/lib/redis

  gitlab:
    image: sameersbn/gitlab:10.4.2-1
    restart: always
    hostname: gitlab
    restart: always
    depends_on:
      - redis
      - postgresql
    links:
      - redis:redisio
      - postgresql:postgresql
    ports:
      - "8080:80"
      - "10443:443"
      - "10022:22"
    volumes:
      - ./data/gitlab:/home/git/data
    environment:
      - DEBUG=true
      - DB_NAME=gitlab
      - DB_USER=gitlab
      - DB_PASS=xxxxx
      - GITLAB_SECRETS_DB_KEY_BASE=xxx
      - GITLAB_SECRETS_SECRET_KEY_BASE=xxxx
      - GITLAB_TIMEZONE=Paris
      - GITLAB_ROOT_PASSWORD=xxxx
      - GITLAB_ROOT_EMAIL=xxxx@xxx.xxx
      - GITLAB_EMAIL_DISPLAY_NAME="GitLab"
      - GITLAB_EMAIL_ENABLED=true
      - GITLAB_SIGNUP_ENABLED=false
      - GITLAB_BACKUP_DIR=/home/git/data/backups
      - GITLAB_BACKUP_SCHEDULE=daily
      - GITLAB_BACKUP_TIME=01:00
      - GITLAB_SSH_HOST=git.xxxxx.xxx
      - GITLAB_SSH_PORT=10022
      - GITLAB_HTTPS=true
      - SSL_CERTIFICATE_PATH=/home/git/data/certs/gitlab.crt
      - SSL_KEY_PATH=/home/git/data/certs/gitlab.key
      - SSL_DHPARAM_PATH=/home/git/data/certs/dhparam.pem
      - SMTP_ENABLED=true
      - SMTP_HOST=smtp.gmail.com
      - SMTP_PORT=587
      - SMTP_USER=xxxxxx@xxx.xx
      - SMTP_PASS=xxxxxxx
      - SMTP_STARTTLS=true
      - SMTP_AUTHENTICATION=login

What am I doing wrong ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docker-compose.yml and the GitLab container log at gitlab_configure_database; compare the database-related environment values with the database-configuration reference linked in the error. Re-run docker-compose and verify that GitLab proceeds past database configuration and connects to the PostgreSQL service.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, postgresql, redis
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.