I’ve been trying to get an instance of Gitlab-CE up and running reliably based on the Omnibus docker image. gitlab/gitlab-ce:latest
Right now I’m lost as to why the volumes I’ve assigned to /var/opt/gitlab
, /var/log/gitlab
, and /etc/gitlab
, are aparently not being used.
The volumes were created using Ansible (effectivly the same as manually running docker volume create
.) So in my docker-compose file, they’re declared as external: True
.
volumes:
raygun_gitlab_etc_dir:
external: True
raygun_gitlab_opt_dir:
external: True
raygun_gitlab_log_dir:
external: True
In the service section:
volumes:
- type: volume
source: raygun_gitlab_etc_dir
target: /etc/gitlab
- type: volume
source: raygun_gitlab_opt_dir
target: /var/opt/gitlab
- type: volume
source: raygun_gitlab_log_dir
target: /var/log/gitlab
If I run ls /var/lib/docker/volumes/raygun_gitlab_opt_dir/_data/
on my host, the directory is empty. If I exec into the container, there is data in /var/opt/gitlab
. Same story for the other two directories.
To further confuse things, in the process of testing all this, I set up another volume and mapped the git_data-dirs
setting to it. That volume has data in it when I check the host.
Is there some weird thing going to because those directories are declared as volumes in the Dockerfile?
My searches on the subject have not illuminated anything yet. Hopefully someone here can help me out…
Thanks in advance!