WRY

Where Are You?
You are on the brave land,
To experience, to remember...

0%

Quick Setup Guide for Jira Cloud Service

Overview

This project includes two services, one is for Jira service and the other is Nginx Proxy service for https.

Requirements

  • A Linux machine with public ip and has installed Docker.
  • A domain pointing to the machine.

Nginx Proxy Service

The Nginx-Proxy service will support Jira reverse proxy, with automatic certificate issuance and renewal.

The docker compose file is like below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
version: '3.4'

services:
nginx-proxy:
image: nginxproxy/nginx-proxy:latest
container_name: nginx-proxy
environment:
- DEFAULT_EMAIL=${S_EMAIL:-xxxxxxx@qq.com}
network_mode: "host"
restart: always
volumes:
- ./conf.d:/etc/nginx/conf.d
- ./nginx-proxy/vhost:/etc/nginx/vhost.d
- ./nginx-proxy/html:/usr/share/nginx/html
- ./certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro

acme-companion:
image: nginxproxy/acme-companion:latest
container_name: nginx-proxy-acme
restart: always
volumes_from:
- nginx-proxy
volumes:
- ./certs:/etc/nginx/certs:rw
- ./nginx-proxy/acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro

docker compose up -d to start the service.

Jira Service

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: '3.4'
services:
jira:
image: atlassian/jira-software
environment:
- VIRTUAL_HOST="domain which pointing to the machine"
- VIRTUAL_PORT=8080
- LETSENCRYPT_HOST="domain which pointing to the machine"
- atl_tomcat_scheme=https
- atl_proxy_name="domain which pointing to the machine"
- atl_proxy_port=443
- JVM_SUPPORT_RECOMMENDED_ARGS='-Dupm.plugin.upload.enabled=true'
- TZ=Asia/Shanghai
- JVM_MINIMUM_MEMORY=1g
- JVM_MAXIMUM_MEMORY=6g
- JVM_CODE_CACHE_ARGS='-XX:InitialCodeCacheSize=1g -XX:ReservedCodeCacheSize=6g'
depends_on:
- mysql
volumes:
- ./home_data:/var/atlassian/application-data/jira
- ./lib/mysql-connector-java-8.0.22.jar:/opt/atlassian/jira/lib/mysql.jar
restart: always

mysql:
image: mysql:8.0
environment:
- TZ=Asia/Shanghai
- MYSQL_DATABASE=jira
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_USER=jira
- MYSQL_PASSWORD=123123
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_bin']
volumes:
- ./mysql_data:/var/lib/mysql
restart: always

Through below two command to start the service.

mkdir lib && cd lib && wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.22/mysql-connector-java-8.0.22.jar && cd -

docker compose up -d

Jira Setup

Jira set up need to config the database firstly.

Set it up myself

Config database

After clicking the next button, may meet 504 error. Don't worry, wait about 10 minutes and restart the service. Use command docker compose logs -f to chech what does Jira did. Use docker compose restart to restart service.

You will see Jira is starting up.

Config base URL.

Generate license key.

Login to Atlassian and follow below picture.

After generating license, click Yes as below shown.

Then 502 error and refresh page.

Config admin account and waiting for the Jira ready, which will cost some time.

Enjoy!