GitBucket behind Nginx and with HTTP/2 Support
10K+
Docker Image with GitBucket server using million12/nginx docker image as base. (HTTP2 and HAProxy SSL termination ready.)
CONTEXTPATH runtime variable --prefix=HOSTNAME runtime variable --host=DATA_DIR runtime variable --gitbucket.home=Container is built with http/2 support and by default it listens on port 443.
Make sure you open it on docker run.
Port 81 is used by default for load balancing (HAProxy) ssl termination.
The default catch-all vhost is configured to work on HTTPS as well.
Nginx error_log is set to stderr and therefore Nginx log is available only via docker logs [contaienr], together with supervisor logs.
This is probably best approach if you'd like to source your logs from outside the container (e.g. via docker logs or CoreOS journald) and you don't want to worry about logging and log management inside your container.
Folders /etc/nginx/ and /data/conf/nginx/ are monitored for any config changes and, when they happen, Nginx is gracefully reloaded.
Nginx status page is configured under /nginx_status URL on the default vhost. Also see STATUS_PAGE_ALLOWED_IP env variable described below.
Eample output:
Active connections: 1
server accepts handled requests
11475 11475 13566
Reading: 0 Writing: 1 Waiting: 0
docker run \
-d \
--name gitbucket \
-p 80:80 \
-p 443:443 \
-p 29418:29418 \
million12/gitbucket
Mount data to host os and edit some variables.
docker run \
-d \
--name gitbucket \
-p 80:80 \
-p 443:443 \
-p 29418:29418 \
-e HOSTNAME=myhostanme.com \
-e DATA_DIR=/my/custom/container/dir \
-v /my/host/dir:/my/custom/container/dir \
million12/gitbucket
docker build -t million12/gitbucket .
29418Default Login and Password is root:root
Use docker command to see if all required containers are up and running:
$ docker ps
Check logs of gitbucket server container:
$ docker logs gitbucket
Sometimes you might just want to review how things are deployed inside a running container, you can do this by executing a bash shell through docker's exec command:
docker exec -ti gitbucket /bin/bash
History of an image and size of layers:
docker history --no-trunc=true million12/gitbucket | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'
Author: Przemyslaw Ozgo ([email protected])
Sponsored by Prototype Brewery - the new prototyping tool for building highly-interactive prototypes of your website or web app. Built on top of Neos CMS and Zurb Foundation framework.
Content type
Image
Digest
Size
137.4 MB
Last updated
almost 6 years ago
docker pull million12/gitbucket