I have some issue with gitlab on docker swarm when i use nfs server as a volume keeper. its failed here:
Recipe: gitlab::database_migrations ruby_block[check remote PG version] action nothing (skipped due to action :nothing) rails_migration[gitlab-rails] action run[2024-02-05T06:12:38+00:00] WARN: gitlab-rails does not have a log_group or default logdir mode defined. Setting to 0700. bash_hide_env[migrate gitlab-rails database] action run [execute] Running db:schema:load rake task psql:/opt/gitlab/embedded/service/gitlab-rails/db/structure.sql:9: NOTICE: extension "btree_gist" already exists, skipping psql:/opt/gitlab/embedded/service/gitlab-rails/db/structure.sql:11: NOTICE: extension "pg_trgm" already exists, skipping
my docker compose:
version: "3.9"
services:
gitlab:
image: gitlab/gitlab-ce:latest
volumes:
- /nfs/gitlab/data:/var/opt/gitlab
- /nfs/gitlab/logs:/var/log/gitlab
- /nfs/gitlab/config:/etc/gitlab
shm_size: '256m'
environment:
GITLAB_OMNIBUS_CONFIG: "from_file('/omnibus_config.rb')"
configs:
- source: gitlab
target: /omnibus_config.rb
secrets:
- gitlab_root_password
networks:
- test
configs:
gitlab:
file: /nfs/gitlab/gitlab.rb
secrets:
gitlab_root_password:
file: /nfs/gitlab/root_password.txt
networks:
test:
external: true
and my gitlab.rb file:
external_url 'http://gitlab.test/'
gitlab_rails['initial_root_password'] = File.read('/run/secrets/gitlab_root_password').gsub("\n", "")
my nfs export:
/nfs/ *(rw,sync,fsid=0,crossmnt,no_subtree_check,no_root_squash)
/nfs/shared *(rw,sync,no_subtree_check,no_root_squash)