Giter VIP home page Giter VIP logo

gitbucket-docker's Introduction

GitBucket on Docker and Kubernetes CircleCI

A GitBucket Docker image and Kubernetes Helm chart.

This repository is automatically updated to the latest GitBucket by CircleCI.

Docker

docker run -p 8080:8080 -p 29418:29418 int128/gitbucket

You can save your GitBucket data to ./gitbucket persistently as follows:

mkdir -p /data/gitbucket
chown -R 1000:1000 /data/gitbucket
docker run -p 8080:8080 -p 29418:29418 -v /data/gitbucket:/var/gitbucket int128/gitbucket

This image runs as gitbucket user (uid=1000, gid=1000), not root for security reason.

This image exposes the following ports:

  • 8080 - Web service
  • 29418 - SSH access to git repository

Environment variables

You can set the following environment variables:

Name Value
GITBUCKET_HOME Directory to store data. Defaults to /var/gitbucket.
GITBUCKET_BASE_URL Base URL. This may be required if container is behind a reverse proxy.
GITBUCKET_DB_URL External database URL. Defaults to H2.
GITBUCKET_DB_USER External database user.
GITBUCKET_DB_PASSWORD External database password.
GITBUCKET_OPTS GitBucket command line options.
JAVA_OPTS JVM options. Defaults to options setting JVM heap by container memory limit. See Dockerfile for more.

Kubernetes Helm

helm repo add int128.github.io https://int128.github.io/helm-charts
helm repo update
helm install int128.github.io/gitbucket

The Helm chart considers the followings:

  • Mount the persistent volume to /var/gitbucket.
  • Fix owner of /var/gitbucket by the init container.
  • Set readiness probe and liveness probe with access to :8080/signin. It should return 200.

Values

You can set the following values:

Name Value
gitbucket.options GitBucket command line options.
javavm.options JVM options. Defaults to setting JVM heap by the memory limit. See Dockerfile for more.
externalDatabase.url The external database URL. Defaults to H2.
externalDatabase.user The external database user.
externalDatabase.password The external database password.
externalDatabase.existingSecret Name of an existing secret to be used for the database password.
externalDatabase.existingSecretKey The key for the database password in the existing secret.
persistentVolume.existingClaim Name of an existing Persistent Volume Claim.
persistentVolume.size Size of a Persistent Volume Claim for dynamic provisioning. Defaults to 10Gi.
resources.limits.memory Memory limit. Defaults to 1Gi.
resources.requests.memory Memory request. Defaults to 1Gi.
ingress.enabled If true, an ingress is be created.
ingress.hosts A list of hosts for the ingress.

External database

You can create a database and user for the GitBucket as follows:

# PostgreSQL
CREATE DATABASE gitbucket;
CREATE USER gitbucket PASSWORD 'gitbucket';
GRANT ALL PRIVILEGES ON DATABASE gitbucket TO gitbucket;

# MySQL
CREATE DATABASE gitbucket;
GRANT ALL PRIVILEGES ON gitbucket.* to gitbucket@'%' identified by 'gitbucket';
FLUSH PRIVILEGES; 

Contributions

This is an open source software licensed under Apache License 2.0. Feel free to open issues and pull requests.

gitbucket-docker's People

Contributors

int128 avatar kraulain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.