Code Monkey home page Code Monkey logo

bitbucket's Introduction

Dockerized Atlassian Bitbucket

"Built for professional teams - Distributed version control system that makes it easy for you to collaborate with your team. The only collaborative Git solution that massively scales." - [Source]

Supported tags and respective Dockerfile links

Product Version Tags Dockerfile
Bitbucket 4.13.0 4.13.0, latest Dockerfile

Related Images

You may also like:

Make It Short

Docker-CLI:

Just type and follow the manual installation procedure in your browser:

$ docker run -d -p 7990:7990 --name bitbucket blacklabelops/bitbucket

Point your browser to http://yourdockerhost:7990

Setup

  1. Start database server for Bitbucket.
  2. Start Bitbucket.
  3. Manual Bitbucket setup.

Firstly, start the database server for Bitbucket:

Note: Change Password!

$ docker run --name postgres_bitbucket -d \
    -e 'POSTGRES_DB=bitbucketdb' \
    -e 'POSTGRES_USER=bitbucketdb' \
    -e 'POSTGRES_PASSWORD=jellyfish' \
    -e 'POSTGRES_ENCODING=UTF8' \
    blacklabelops/postgres

Secondly, start Bitbucket:

$ docker run -d --name bitbucket \
	  --link postgres_bitbucket:postgres_bitbucket \
	  -p 7990:7990 blacklabelops/bitbucket

Starts Crowd and links it to the postgresql instances. JDBC URL: jdbc:postgresql://postgres_bitbucket/bitbucketdb

Thirdly, configure your Bitbucket yourself and fill it with a test license.

Point your browser to http://yourdockerhost:7990

  1. Choose External for Database and fill out the form:
  • Database Type: PostgreSQL
  • Hostname: postgres_bitbucket
  • Port: 5432
  • Database name: bitbucketdb
  • Database username: bitbucketdb
  • Database password: jellyfish
  1. Create and enter license information
  2. Fill out the rest of the installation procedure.

Proxy Configuration

You can specify your proxy host and proxy port with the environment variables BITBUCKET_PROXY_NAME and BITBUCKET_PROXY_PORT. The value will be set inside the Atlassian server.xml at startup!

When you use https then you also have to include the environment variable BITBUCKET_PROXY_SCHEME.

Example HTTPS:

  • Proxy Name: myhost.example.com
  • Proxy Port: 443
  • Poxy Protocol Scheme: https

Just type:

$ docker run -d --name bitbucket \
    -e "BITBUCKET_PROXY_NAME=myhost.example.com" \
    -e "BITBUCKET_PROXY_PORT=443" \
    -e "BITBUCKET_PROXY_SCHEME=https" \
    blacklabelops/bitbucket

Will set the values inside the server.xml in /opt/bitbucket/.../server.xml

NGINX HTTP Proxy

This is an example on running Atlassian Bitbucket behind NGINX with 2 Docker commands!

First start Bitbucket:

$ docker run -d --name bitbucket \
    -e "BITBUCKET_PROXY_NAME=192.168.99.100" \
    -e "BITBUCKET_PROXY_PORT=80" \
    -e "BITBUCKET_PROXY_SCHEME=http" \
    blacklabelops/bitbucket

Example with dockertools

Then start NGINX:

$ docker run -d \
    -p 80:80 \
    --name nginx \
    --link bitbucket:bitbucket \
    -e "SERVER1REVERSE_PROXY_LOCATION1=/" \
    -e "SERVER1REVERSE_PROXY_PASS1=http://bitbucket:7990" \
    blacklabelops/nginx

Bitbucket will be available at http://192.168.99.100.

NGINX HTTPS Proxy

This is an example on running Atlassian Bitbucket behind NGINX-HTTPS with2 Docker commands!

Note: This is a self-signed certificate! Trusted certificates by letsencrypt are supported. Documentation can be found here: blacklabelops/nginx

First start Bitbucket:

$ docker run -d --name bitbucket \
    -e "BITBUCKET_PROXY_NAME=192.168.99.100" \
    -e "BITBUCKET_PROXY_PORT=80" \
    -e "BITBUCKET_PROXY_SCHEME=http" \
    blacklabelops/bitbucket

Example with dockertools

Then start NGINX:

$ docker run -d \
    -p 443:443 \
    --name nginx \
    --link bitbucket:bitbucket \
    -e "SERVER1REVERSE_PROXY_LOCATION1=/" \
    -e "SERVER1REVERSE_PROXY_PASS1=http://bitbucket:7990" \
    -e "SERVER1CERTIFICATE_DNAME=/CN=CrustyClown/OU=SpringfieldEntertainment/O=crusty.springfield.com/L=Springfield/C=US" \
    -e "SERVER1HTTPS_ENABLED=true" \
    -e "SERVER1HTTP_ENABLED=false" \
    blacklabelops/nginx

Bitbucket will be available at https://192.168.99.100.

Vagrant

First install:

Vagrant is fabulous tool for pulling and spinning up virtual machines like docker with containers. I can configure my development and test environment and simply pull it online. And so can you! Install Vagrant and Virtualbox and spin it up. Change into the project folder and build the project on the spot!

$ vagrant up
$ vagrant ssh
[vagrant@localhost ~]$ cd /vagrant
[vagrant@localhost ~]$ docker-compose up

Bitbucket will be available on http://localhost:8080 on the host machine.

Support

Leave a message and ask questions on Hipchat: blacklabelops/hipchat

References

bitbucket's People

Contributors

maciossek avatar

Watchers

 avatar  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.