<commit_before># Dockerized Atlassian Jira Software

> Release: blacklabelops/jirasoftware:latest

[![Circle CI](https://circleci.com/gh/blacklabelops/jira/tree/master.svg?style=shield)](https://circleci.com/gh/blacklabelops/centos/tree/master) [![Docker Repository on Quay.io](https://quay.io/repository/blacklabelops/jirasoftware/status "Docker Repository on Quay")](https://quay.io/repository/blacklabelops/centos) [![Docker Stars](https://img.shields.io/docker/stars/blacklabelops/jirasoftware.svg)](https://hub.docker.com/r/blacklabelops/jirasoftware/) [![Docker Pulls](https://img.shields.io/docker/pulls/blacklabelops/jirasoftware.svg)](https://hub.docker.com/r/blacklabelops/jirasoftware/)

## Instant Usage

[![Deploy to Tutum](https://s.tutum.co/deploy-to-tutum.svg)](https://dashboard.tutum.co/stack/deploy/)

## Make It Short

Docker-Compose:

~~~~
$ curl -O https://raw.githubusercontent.com/blacklabelops/jira/master/jirasoftware/docker-compose.yml
$ docker-compose up -d
~~~~

> Jira will be available at http://yourdockerhost

Docker-CLI:

~~~~
$ docker run -d -p 80:8080 --name jira blacklabelops/jirasoftware
~~~~

> Jira will be available at http://yourdockerhost

## Vagrant

First install:

* [Vagrant](https://www.vagrantup.com/)
* [Virtualbox](https://www.virtualbox.org/)

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
~~~~

> Jira will be available on localhost:8100 on the host machine.

## Setup Example Using Docker

This example is "by foot" using the docker cli. In this example we setup an empty PostgreSQL container. Then we connect and configure the Jira accordingly. Afterwards the Jira container can always resume on the database.

### PostgreSQL

Let's take an PostgreSQL Docker Image and set it up:


Postgres Official Docker Image:

~~~~
$ docker run --name postgres -d \
    -e 'POSTGRES_USER=jiradb' \
    -e 'POSTGRES_PASSWORD=<PASSWORD>' \
    -e 'POSTGRES_DB=jiradb' \
    postgres:9.5
~~~~

> This is the official postgres image.

Postgres Community Docker Image:

~~~~
$ docker run --name postgres -d \
    -e 'DB_USER=jiradb' \
    -e 'DB_PASS=<PASSWORD>' \
    -e 'DB_NAME=jiradb' \
    sameersbn/postgresql:9.4-12
~~~~

> This is the sameersbn/postgresql docker container I tested.

Now start the Jira container and let it use the container. On first startup you have to configure your Jira yourself and fill it with a test license. Afterwards every time you connect to a database the Jira configuration will be skipped.

~~~~
$ docker run -d --name jira \
	  -e "JIRA_DATABASE_URL=postgresql://jiradb@postgres/jiradb" \
	  -e "JIRA_DB_PASSWORD=<PASSWORD>"  \
	  --link postgres:postgres \
	  -p 80:8080 blacklabelops/jirasoftware
~~~~

>  Start the Jira and link it to the postgresql instance.

### MySQL

Let's take an MySQL container and set it up:

MySQL Official Docker Image:

~~~~
$ docker run -d --name mysql \
    -e 'MYSQL_ROOT_PASSWORD=<PASSWORD>' \
    -e 'MYSQL_DATABASE=jiradb' \
    -e 'MYSQL_USER=jiradb' \
    -e 'MYSQL_PASSWORD=<PASSWORD>' \
    mysql:5.6
~~~~

> This is the tutum/mysql docker container I tested.

MySQL Community Docker Image:

~~~~
$ docker run -d --name mysql \
    -e 'ON_CREATE_DB=jiradb' \
    -e 'MYSQL_USER=jiradb' \
    -e 'MYSQL_PASS=<PASSWORD>' \
    tutum/mysql:5.6
~~~~

> This is the tutum/mysql docker container I tested.

Now start the Jira container and let it use the container. On first startup you have to configure your Jira yourself and fill it with a test license. Afterwards every time you connect to a database the Jira configuration will be skipped.

~~~~
$ docker run -d --name jira \
    -e "JIRA_DATABASE_URL=mysql://jiradb@mysql/jiradb" \
    -e "JIRA_DB_PASSWORD=<PASSWORD>"  \
    --link mysql:mysql \
    -p 80:8080 \
    blacklabelops/jirasoftware
~~~~

>  Start the Jira and link it to the postgresql instance.

## Credits

This project is very grateful for code and examples from the repository:

[atlassianlabs/atlassian-docker](https://bitbucket.org/atlassianlabs/atlassian-docker)

## References

* [Atlassian Jira](https://www.atlassian.com/software/jira)
* [Docker Homepage](https://www.docker.com/)
* [Docker Compose](https://docs.docker.com/compose/)
* [Docker Userguide](https://docs.docker.com/userguide/
* [Oracle Java8](https://java.com/de/download/)
* [Imagelayers.io](https://imagelayers.io/?images=blacklabelops/jirasoftware:latest)<commit_msg>Added proxy examples.<commit_after># Dockerized Atlassian Jira Software

> Release: blacklabelops/jirasoftware:latest

[![Circle CI](https://circleci.com/gh/blacklabelops/jira/tree/master.svg?style=shield)](https://circleci.com/gh/blacklabelops/centos/tree/master) [![Docker Repository on Quay.io](https://quay.io/repository/blacklabelops/jirasoftware/status "Docker Repository on Quay")](https://quay.io/repository/blacklabelops/centos) [![Docker Stars](https://img.shields.io/docker/stars/blacklabelops/jirasoftware.svg)](https://hub.docker.com/r/blacklabelops/jirasoftware/) [![Docker Pulls](https://img.shields.io/docker/pulls/blacklabelops/jirasoftware.svg)](https://hub.docker.com/r/blacklabelops/jirasoftware/)

## Instant Usage

[![Deploy to Tutum](https://s.tutum.co/deploy-to-tutum.svg)](https://dashboard.tutum.co/stack/deploy/)

## Make It Short

Docker-Compose:

~~~~
$ curl -O https://raw.githubusercontent.com/blacklabelops/jira/master/jirasoftware/docker-compose.yml
$ docker-compose up -d
~~~~

> Jira will be available at http://yourdockerhost

Docker-CLI:

~~~~
$ docker run -d -p 80:8080 --name jira blacklabelops/jirasoftware
~~~~

> Jira will be available at http://yourdockerhost

## Vagrant

First install:

* [Vagrant](https://www.vagrantup.com/)
* [Virtualbox](https://www.virtualbox.org/)

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
~~~~

> Jira will be available on localhost:8100 on the host machine.

## Setup Example Using Docker

This example is "by foot" using the docker cli. In this example we setup an empty PostgreSQL container. Then we connect and configure the Jira accordingly. Afterwards the Jira container can always resume on the database.

### PostgreSQL

Let's take an PostgreSQL Docker Image and set it up:


Postgres Official Docker Image:

~~~~
$ docker run --name postgres -d \
    -e 'POSTGRES_USER=jiradb' \
    -e 'POSTGRES_PASSWORD=<PASSWORD>' \
    -e 'POSTGRES_DB=jiradb' \
    postgres:9.5
~~~~

> This is the official postgres image.

Postgres Community Docker Image:

~~~~
$ docker run --name postgres -d \
    -e 'DB_USER=jiradb' \
    -e 'DB_PASS=<PASSWORD>' \
    -e 'DB_NAME=jiradb' \
    sameersbn/postgresql:9.4-12
~~~~

> This is the sameersbn/postgresql docker container I tested.

Now start the Jira container and let it use the container. On first startup you have to configure your Jira yourself and fill it with a test license. Afterwards every time you connect to a database the Jira configuration will be skipped.

~~~~
$ docker run -d --name jira \
	  -e "JIRA_DATABASE_URL=postgresql://jiradb@postgres/jiradb" \
	  -e "JIRA_DB_PASSWORD=<PASSWORD>"  \
	  --link postgres:postgres \
	  -p 80:8080 blacklabelops/jirasoftware
~~~~

>  Start the Jira and link it to the postgresql instance.

### MySQL

Let's take an MySQL container and set it up:

MySQL Official Docker Image:

~~~~
$ docker run -d --name mysql \
    -e 'MYSQL_ROOT_PASSWORD=<PASSWORD>' \
    -e 'MYSQL_DATABASE=jiradb' \
    -e 'MYSQL_USER=jiradb' \
    -e 'MYSQL_PASSWORD=<PASSWORD>' \
    mysql:5.6
~~~~

> This is the tutum/mysql docker container I tested.

MySQL Community Docker Image:

~~~~
$ docker run -d --name mysql \
    -e 'ON_CREATE_DB=jiradb' \
    -e 'MYSQL_USER=jiradb' \
    -e 'MYSQL_PASS=<PASSWORD>' \
    tutum/mysql:5.6
~~~~

> This is the tutum/mysql docker container I tested.

Now start the Jira container and let it use the container. On first startup you have to configure your Jira yourself and fill it with a test license. Afterwards every time you connect to a database the Jira configuration will be skipped.

~~~~
$ docker run -d --name jira \
    -e "JIRA_DATABASE_URL=mysql://jiradb@mysql/jiradb" \
    -e "JIRA_DB_PASSWORD=<PASSWORD>"  \
    --link mysql:mysql \
    -p 80:8080 \
    blacklabelops/jirasoftware
~~~~

>  Start the Jira and link it to the postgresql instance.

## Proxy Configuration

You can specify your proxy host and proxy port with the environment variables JIRA_PROXY_NAME and JIRA_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 JIRA_PROXY_SCHEME.

Example HTTPS:

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

Just type:

~~~~
$ docker run -d --name jira \
    -e "JIRA_PROXY_NAME=myhost.example.com" \
    -e "JIRA_PROXY_PORT=443" \
    -e "JIRA_PROXY_SCHEME=https" \
    blacklabelops/jirasoftware
~~~~

> Will set the values inside the server.xml in /opt/jira/conf/server.xml

## NGINX HTTP Proxy

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

First start Jira:

~~~~
$ docker run -d --name jira \
    -e "JIRA_PROXY_NAME=www.example.com" \
    -e "JIRA_PROXY_PORT=80" \
    -e "JIRA_PROXY_SCHEME=http" \
    blacklabelops/jirasoftware
~~~~

Then start NGINX:

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

> Jira will be available at http://yourdockerhost.

## NGINX HTTPS Proxy

This is an example on running Atlassian Jira 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](https://github.com/blacklabelops/nginx)

First start Jira:

~~~~
$ docker run -d --name jira \
    -e "JIRA_PROXY_NAME=crusty.springfield.com" \
    -e "JIRA_PROXY_PORT=443" \
    -e "JIRA_PROXY_SCHEME=https" \
    blacklabelops/jirasoftware
~~~~

Then start NGINX:

~~~~
$ docker run -d \
    -p 443:44300 \
    --name nginx \
    --link confluence:confluence
    -e "SERVER1REVERSE_PROXY_LOCATION1=/" \
    -e "SERVER1REVERSE_PROXY_PASS1=http://jira:8080" \
    -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
~~~~

> Confluence will be available at https://yourdockerhost.

## Log File Configuration

You can reconfigure the logfile location with the environment variable JIRA_LOGFILE_LOCATION!

Example:

~~~~
$ docker run -d --name jira \
    -e "JIRA_LOGFILE_LOCATION=/var/atlassian/jira/logs" \
    blacklabelops/jirasoftware
~~~~

> Will write logs to /var/atlassian/jira/logs. Note: Must be accessible by jira:jira user!

## Credits

This project is very grateful for code and examples from the repository:

[atlassianlabs/atlassian-docker](https://bitbucket.org/atlassianlabs/atlassian-docker)

## References

* [Atlassian Jira](https://www.atlassian.com/software/jira)
* [Docker Homepage](https://www.docker.com/)
* [Docker Compose](https://docs.docker.com/compose/)
* [Docker Userguide](https://docs.docker.com/userguide/
* [Oracle Java8](https://java.com/de/download/)
* [Imagelayers.io](https://imagelayers.io/?images=blacklabelops/jirasoftware:latest)
{'fraction_non_alphanumeric': 0.1237717777227314, 'fraction_numerical': 0.009247791264140038, 'mean_word_length': 3.8957154405820535, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 41, 'https://': 42, 'lorem ipsum': 0, 'www.': 9, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5287539', 'n_tokens_mistral': 4399, 'n_tokens_neox': 4207, 'n_words': 1145}