docker container and docker-compose file for gitbucket
data/ conf | 7 years ago | ||
docker | 7 years ago | ||
.env | 7 years ago | ||
.gitignore | 7 years ago | ||
LICENSE.md | 7 years ago | ||
README.md | 7 years ago | ||
RELEASES.md | 7 years ago | ||
backup.sh | 7 years ago | ||
docker-compose.yml | 7 years ago | ||
generate_password.sh | 7 years ago | ||
gitbucket.conf | 7 years ago | ||
setUserId.sh | 7 years ago |
This docker container of gitbucket is under testing!!!
Get code from repository:
git clone https://gitbucket.pgollor.de/git/docker/gitbucket.git cd gitbucket
Generate new passwords for your databse!!!
./generate_password.sh
Get latest container:
docker-compose pull
Change the confoguration and start with:
docker-compose up -d
Open 127.0.0.1:8080
and be habby. :-)
Please use the configuration file gitbucket.conf
for your personal changes. There are three configs for gitbucket:
GITBUCKET_BIND
: ip address to bind toGITBUCKET_WEB_PORT
: web port to bind toGITBUCKET_SSH_PORT
: ssh port to bind toUpdate your gitbucket image in three steps. But first of all: MAKE A BACKUP!!!
Commit your local changes. Changes in gitbucket.conf
will be ignored!
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
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)
To use plugins download the plugin and move it into data/plugins
. After that restart the gitbucket container with docker-compose restart main-gitbucket
.
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.
Please check the gitbucket log files with
docker-compose logs main-gitbucket
If you get Could not connect to address=(host=172.22.2.251)
as error: Please restart the gitbucket container with docker-compose restart main-gitbucket
because the mariadb container needs some time to run completly at the first start. After that it should be work. If doesn't please create a issue here.
I got some inspirations for this project from:
: Please see license