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

Permissions issue #20

Open
w1jp opened this issue Dec 6, 2024 · 3 comments
Open

Permissions issue #20

w1jp opened this issue Dec 6, 2024 · 3 comments

Comments

@w1jp
Copy link

w1jp commented Dec 6, 2024

I am new to this image. I read the readm.md and modified your docker-compose.yaml:

# 241205: trying out this instance.
# [email protected]

services:
  gitlab:
    image: alpinelinux/alpine-docker-gitlab
    build: gitlab
    hostname: ${GITLAB_HOSTNAME}
    restart: always
    volumes:
      - ${VOLUME_ROOT}/repositories:/home/git/repositories
      - ${VOLUME_ROOT}/config:/etc/gitlab
      - ${VOLUME_ROOT}/log:/var/log
      - ${VOLUME_ROOT}/builds:/home/git/gitlab/builds
      - ${VOLUME_ROOT}/shared:/home/git/gitlab/shared
      - ${VOLUME_ROOT}/uploads:/home/git/gitlab/public/uploads
      - ${VOLUME_ROOT}/plugins:/home/git/gitlab/plugins
    ports:
      - "2222:22"
      - "8064:80"
    depends_on:
      - postgres
      - redis
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      GITLAB_ROOT_PASSWORD: ${GITLAB_ROOT_PASSWORD}
      GITLAB_BACKUP_SKIP: "true"
      GITLAB_USE_PUMA: "true"

  postgres:
    image: postgres:11-alpine
    restart: always
    volumes:
      - ${VOLUME_ROOT}/postgres:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}

  redis:
    image: redis:5-alpine
    restart: always
    volumes:
      - ${VOLUME_ROOT}/redis:/data
    entrypoint: redis-server --appendonly yes

Yes, I have a .env file defined with those variables.

I receved a bunch of permissions errors (see attached):
241206-1449.log

Thoughts?

Tnx,
Jon

@Ikke
Copy link
Contributor

Ikke commented Dec 12, 2024

What is the value of POSTGRES_USER in your .env file, and did you set / change it after starting the postgres container?

DETAIL:  Role "root" does not exist.

Is innocent, it;s due to the pg_isready check without providing a user.

DETAIL:  Role "postgres" does not exist.

This means that it tries to login with a user that does not exist. So verify what user does exist or stop the containers, remove the storage/ directory and restart (this would remove all existing data though).

@w1jp
Copy link
Author

w1jp commented Dec 12, 2024

What is the value of POSTGRES_USER in your .env file, and did you set / change it after starting the postgres container?

POSTGRES_USER=gatorgit

I guess I am assuming that the docker compose up creates that user if it doesn't exist. Otherwise, what user should I use?

On a similar note, is the process to get the default user the same as described on doc.gitlab.com?

@Ikke
Copy link
Contributor

Ikke commented Dec 13, 2024

POSTGRES_USER=gatorgit

I guess I am assuming that the docker compose up creates that user if it doesn't exist. Otherwise, what user should I use?

It uses the canonical postgres image, so yes, it would create that uses when the database container is first started.

Please verify that storage/config/gitlab/database.yml mentions the same username. You also need to make sure it mentions a separate ci database, which for now, can use the exact same settings as main, except with the addition of database_tasks: false.

On a similar note, is the process to get the default user the same as described on doc.gitlab.com?

Do you mean the gitlab user to login?

From the logs:

== Seed from /home/git/gitlab/db/fixtures/production/003_admin.rb
Administrator account created:

login:    root
password: You'll be prompted to create one on your first visit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants