GitLab on Docker: how to persist user data between deployments?

眉间皱痕 提交于 2020-01-06 04:27:04

问题


I am using the official GitLab Docker image.

I want to have pre-configured user accounts available in my GitLab container to be used for tests.

But user accounts are saved in a volume, so I can't just commit and push the GitLab image after having created my test users.

So: how should I persist them?

One way would be to create them on startup using the API after each new deployment, but this is quite slow/cumbersome.


回答1:


As you said, it's not going to be as easy as committing and pushing a Docker image because of the VOLUMEs declared in the gitlab-ce and gitlab-ee images.

Perhaps you can backup and restore the instances? So, create a backup of the state you want including the pre-configured accounts, and then restore that onto new GitLab containers after they're started?



来源:https://stackoverflow.com/questions/51731648/gitlab-on-docker-how-to-persist-user-data-between-deployments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!