docker container and docker-compose file for gitbucket

data/ conf add mysql config 6 years ago
docker update to docker 4.15.0 6 years ago
.env inital commit 6 years ago
.gitignore ignore data and gist dir 6 years ago
LICENSE.md add license 6 years ago
README.md update license 6 years ago
RELEASES.md change release 6 years ago
backup.sh add config fiels backup 6 years ago
docker-compose.yml fix tiemzoen bug 6 years ago
generate_password.sh add script to change database passwords 6 years ago
gitbucket.conf add timezone config 6 years ago
setUserId.sh add user id update script 6 years ago
README.md

docker container for gitbucket

This docker container of gitbucket is under testing!!!

Usage

Dependencies

Installation

  1. Get code from repository:

    git clone https://gitbucket.pgollor.de/git/docker/gitbucket.git
    cd gitbucket
  2. Generate new passwords for your databse!!!

    ./generate_password.sh
  3. Get latest container:

    docker-compose pull
  4. Change the confoguration and start with:

    docker-compose up -d
  5. Open 127.0.0.1:8080 and be habby. :-)

Configuration

Please use the configuration file gitbucket.conf for your personal changes. There are three configs for gitbucket:

  • GITBUCKET_BIND: ip address to bind to
  • GITBUCKET_WEB_PORT: web port to bind to
  • 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.

Backup

For backuping the mysql database and the repositories you could use the backup.sh script and combine it with a daily cronjob. This script will create a compressed backup and keep the files 10 days in the backup directory. All files which are older then 10 days will be deleted.

TODO

  • check gitbucket.war hash after download
  • maybe a nginx container with ssl???

Inspirations

I got some inspirations for this project from:

License

cc-bc-sa: Please see license