I host a gitlab-ce with docker image and start with docker compose.
Here is my docker compose file
version: "3.6"
services:
web:
image: 'gitlab/gitlab-ce'
container_name: 'gitlab-master'
restart: always
hostname: 'url'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://url:9090'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
networks:
- gitlab-network
ports:
- '80:80'
- '443:443'
- '9090:9090'
- '2224:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'
networks:
gitlab-network:
name: gitlab-network
I pack my config folders, logs and data and transfer to another server. When I start a new gitlab server and mount this folders. I got the permission denied error. I use chmod -R 777 /srv/gitlab/*
. It still error. How could I fix this?