Gitlab - help needed!

Post Reply
md101
New here
Posts: 4
Joined: Sun May 14, 2017 11:14 am

Gitlab - help needed!

Post by md101 »

I installed the QNAP Gitlab Docker image. No issue occurred. I can access the site and setup my projects. However, after I restarted the container instance, all of my data were gone :( . Is there any way to save the data to local NAS directory? Thank you very much :!:
md101
New here
Posts: 4
Joined: Sun May 14, 2017 11:14 am

Re: Gitlab - help needed!

Post by md101 »

The issue has been resolved.
User avatar
OneCD
Guru
Posts: 12155
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Gitlab - help needed!

Post by OneCD »

And how did you resolve this issue? ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
md101
New here
Posts: 4
Joined: Sun May 14, 2017 11:14 am

Re: Gitlab - help needed!

Post by md101 »

OneCD wrote:And how did you resolve this issue? ;)
1) start container
2) ssh into qnap
3) install gitlab-ce from docker hub

Code: Select all

docker pull gitlab/gitlab-ce:latest
4) I created "/share/Container/gitlab/config", "volume /share/Container/gitlab/logs", "/share/Container/gitlab/data" in NAS. run docker command:

Code: Select all

docker run --detach \
    --hostname <your site> \
    --publish 10443:443 --publish 10080:80 --publish 10022:22 \
    --name gitlab \
    --restart always \
    --env GITLAB_OMNIBUS_CONFIG="mattermost['log_console_level'] = 'ERROR';" \
    --env GITLAB_OMNIBUS_CONFIG="gitlab_shell['log_level'] = 'ERROR';" \
    --volume /share/Container/gitlab/config:/etc/gitlab \
    --volume /share/Container/gitlab/logs:/var/log/gitlab \
    --volume /share/Container/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce:latest
The GIT data will be saved in your NAS directories.
5) if you've turned on the NAS security (restricted IP access), check your container IP address:

Code: Select all

docker network inspect bridge
Add the internal IP to the restricted IP list
6) create port forwarding rules for 10080, 10022 and 10443 (if you've configured https) in your router

you may use the container's web interface to stop/restart the gitlab-ce container.
Post Reply

Return to “Container Station”