diff --git a/README.md b/README.md index b4f6482..bc83709 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,31 @@ - `GITBUCKET_SSH_PORT`: ssh port to bind to +### Update +Update your gitbucket image in three steps. +But first of all: **MAKE A BACKUP!!!** + +1. Commit your local changes. Changes in `gitbucket.conf` will be ignored! + +2. get the new image +Shutdown and remove your images. This will not delete your mysql database volume. +``` +docker-compose down +``` +After that get the new image and start it: +``` +docker-compose pull +docker-compose up -d --remove-orphans +``` + +3. cleanup your docker environment +This step is optional. Please do this only if you understand the next line. +``` +docker rmi -f $(docker images -f "dangling=true" -q) +``` + + + ### Plugins To use plugins download the plugin and move it into `data/plugins`. After that restart the gitbucket container with `docker-compose restart main-gitbucket`. @@ -54,7 +79,6 @@ ## TODO -- wait for the next update and write an update howto - maybe a nginx container with ssl??? diff --git a/docker-compose.yml b/docker-compose.yml index e037118..54380ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ services: main-gitbucket: - image: pgollor/gitbucket + image: pgollor/gitbucket:4.13 restart: always depends_on: - mysql-gitbucket @@ -13,8 +13,10 @@ - GITBUCKET_DATABASE_PASSWORD=${GITBUCKET_DATABASE_PASSWORD} volumes: - ./data/repositories/:/srv/gitbucket/repositories/ - - ./data/plugins/:/srv/gitbucket/plugins/ + - ./data/plugins/:/srv/gitbucket/plugins/:ro - ./data/conf/gitbucket/gitbucket.conf:/srv/gitbucket/gitbucket.conf + tmpfs: + - /tmp ports: - "${GITBUCKET_BIND:-127.0.0.1}:${GITBUCKET_WEB_PORT:-8080}:8080" - "${GITBUCKET_BIND:-127.0.0.1}:${GITBUCKET_SSH_PORT:-29418}:29418" diff --git a/docker/Dockerfile b/docker/Dockerfile index f2b0c86..cace755 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,7 +16,7 @@ # setup RUN apk update RUN apk add ca-certificates wget -RUN wget https://github.com/gitbucket/gitbucket/releases/download/4.12.1/gitbucket.war -O $GITBUCKET_HOME/latest.war +RUN wget https://github.com/gitbucket/gitbucket/releases/download/4.13/gitbucket.war -O $GITBUCKET_HOME/latest.war # clean RUN apk del ca-certificates wget