docker部署JIRA

程序员成长之旅 · 程序员成长之旅/Docker学习 · 580 字

sudo docker run -d --name jira\ --name=jira_server \ --restart always \ -p 18009:8080 \ -e TZ="Asia/Shanghai" \ -m 4096M \ -v /dockerVolumes/wwwVolumes/jira:/var/atlassian/jira \ --network docker-universal-network \ --network-alias jira \ wangzan18/jira:latest

1 sudo docker run -d

--name jira
2

--name

jira_server
3

--restart always
4

-p

18009 :8080
5

-e

TZ

"Asia/Shanghai"
6

-m 4096M
7

-v /dockerVolumes/wwwVolumes/jira:/var/atlassian/jira
8

--network docker-universal-network
9

--network-alias jira
10 wangzan18/jira:latest 步骤1: 配置文件

file: my.cnf # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ [mysqld] default-storage-engine=INNODB # 将默认存储引擎设置为InnoDB character_set_server=utf8mb4 # 指定数据库服务器使用的字符集 innodb_default_row_format=DYNAMIC # 将默认行格式设置为 DYNAMIC innodb_large_prefix=ON # 启用大前缀 innodb_file_format=Barracuda # 将InnoDB文件格式设置为Barracuda innodb_log_file_size=2G # innodb_log_file_size至少为2G # file: my.cnf

1

file: my.cnf

2

Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.

3

4

This program is free software; you can redistribute it and/or modify

5

it under the terms of the GNU General Public License as published by

6

the Free Software Foundation; version 2 of the License.

7

8

This program is distributed in the hope that it will be useful,

9

but WITHOUT ANY WARRANTY; without even the implied warranty of

10

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

11

GNU General Public License for more details.

12

13

You should have received a copy of the GNU General Public License

14

along with this program; if not, write to the Free Software

15

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

16 17 !includedir /etc/mysql/conf.d/ 18 !includedir /etc/mysql/mysql.conf.d/ 19 [mysqld] 20 default-storage-engine

INNODB

将默认存储引擎设置为InnoDB

21 character_set_server

utf8mb4

指定数据库服务器使用的字符集

22 innodb_default_row_format

DYNAMIC

将默认行格式设置为 DYNAMIC

23 innodb_large_prefix

ON

启用大前缀

24 innodb_file_format

Barracuda

将InnoDB文件格式设置为Barracuda

25 innodb_log_file_size

2G

innodb_log_file_size至少为2G

26

file: my.cnf

步骤二: 用户创建 -- 用户创建 GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb.* TO 'jirauser'@'%' IDENTIFIED BY 'MeDRk5LgZ2cyX8'; flush privileges;

x

1 -- 用户创建 2 GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , ALTER , INDEX on jiradb. * TO 'jirauser' @ '%' IDENTIFIED BY

'MeDRk5LgZ2cyX8' ; 3 flush privileges ;