Created
January 28, 2016 21:57
-
-
Save evenme/ef4d11c3ef3ecba295ea to your computer and use it in GitHub Desktop.
Gitlab update steps using docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove old container and image | |
docker stop <CONTAINER> | |
docker rm <CONTAINER> | |
docker rmi $(docker images | grep gitlab | awk {'print $3'}) | |
# Download and run the new image (latest) | |
docker run -t \ | |
--publish 443:443 \ | |
--publish 80:80 \ | |
--publish 22:22 \ | |
--name gitlab \ | |
--restart always \ | |
--volume /srv/gitlab/config:/etc/gitlab \ | |
--volume /srv/gitlab/logs:/var/log/gitlab \ | |
--volume /srv/gitlab/data:/var/opt/gitlab \ | |
gitlab/gitlab-ce:latest | |
# Perform rake checks and db migrations | |
docker exec -it gitlab gitlab-rake gitlab:check | |
docker exec -it gitlab gitlab-rake db:migrate | |
# Reconfigure and restart container | |
docker exec -it gitlab gitlab-ctl reconfigure | |
docker restart gitlab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment