容器化 Confluence 使用拾遗
source link: https://soulteary.com/2019/04/19/talk-about-confluence-with-docker.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
之前介绍过使用容器搭建Confluence 作为团队协同工具使用。在使用过程中,我们遇到了一些问题,比如文章时间展示不正确、中文内容无法显示、运行资源不足。
下面就来讲讲在容器场景下,怎么解决简单快速的这些问题。
解决文章时间戳不正确
默认 Confluence
使用的是东一区(零时区)的时间制式,想解决时区问题,需要先在 environment
字段内指定 CATALINA_OPTS
参数内容。
environment: - 'CATALINA_OPTS= -Duser.timezone=GMT+08'
另外,为了避免容器和宿主机时间不一致,可以将本机的 localtime
挂载到容器中。
volumes: - /etc/localtime:/etc/localtime:ro
解决应用卡顿
之前的完整配置将会使用 Confluence
默认资源运行服务,程序最大使用内存是 1GB
,当团队人数和内容多了之后,由于资源不足,会让服务运行变慢,最简单的解决方案就是增加资源。只需要在 environment
字段内声明下面内容即可,举个例子,我们可以提高他使用的内存资源为 4~8 GB
。
environment: - 'JVM_MINIMUM_MEMORY=4096m' - 'JVM_MAXIMUM_MEMORY=8192m'
解决中文文档不能预览
由于默认容器镜像不包含中文字体,当我们想预览一个中文文档的时候,得到的结果会是一堆“口口口”方块。
解决这个问题的第一步是为镜像系统安装中文字体,下载一些中文字体 ( ttf/ttc ),比如宋体、楷体,将文件命名为: simsun.ttf
、 simkai.ttc
,然后保存在 fonts
文件夹中,然后挂载到容器系统中。
volumes: - ./fonts:/usr/local/share/fonts
接着在参数中添加转换参数:
environment: - 'CATALINA_OPTS= -Duser.timezone=GMT+08 -Dconfluence.document.conversion.fontpath=/usr/local/share/fonts/ '
如果你之前没有预览过中文文档,现在重启应用,问题就解决了。
如果你之前已经预览过中文文档,发现重启应用,预览问题依然如故,那么可以通过清除预览缓存来解决问题。
在之前的配置中,我们将应用数据挂载到了本地。
volumes: - ./data:/var/atlassian/application-data/confluence
通过清空下列目录中的缓存内容,可以即时解决问题。
rm -rf ./data/shared-home/dcl-document/* rm -rf ./data/shared-home/dcl-document_hd/* rm -rf ./data/shared-home/dcl-thumbnail/*
最后
先聊到这里吧。
–EOF
Recommend
-
88
今天讨论的是 Core Data 数据迁移中的一些细节问题,参阅了不少资料,进行了反复的验证,可以说填上了不少坑。本文讨论的范围仅限于自动触发的自定义迁移情况,其他情况后续再补充。数据备份与还原在迁移测试前,先将原数据进行备份:打开 Xcode -> Windows...
-
65
-
43
-
61
-
31
Strong opinions are very useful to others. Those who were undecided or ambivalent can just adopt your stance. But those who disagr
-
36
小型团队协同,或者想花钱买个省心,Confluence 是比较好的选择之一。但是最近安装 Confluence ,发现官方和网上的安装介绍都比较“落后”低效,所以有了本篇内容。 本文将介绍如何使用 Docker Compose 快速...
-
21
长话短说,其实早在2016年我就创建了我的Hackerone/Bugcrowd profiles,但我从未在那里报告过任何的漏洞。这是第一个让我觉得值得报告的漏洞,也打破了我多年来零报告的记录。 安全公告 Confluence官方发布安全更新...
-
15
之前写过三篇如何使用“ 容器化方案来搭建 Confluence ”,本文将基于最近最新推出的 Confluence 7.3 来演示如何使用新版的软件。 如果你想要给公司团队或者个人搭建...
-
7
在 C 和 C# 编程语言中, 结构体(Struct) 是值类型数据结构,它使得一个单一变量可以存储多种类型的相关数据。在 C 语言中还有一种和结构体非常类似的语法,叫 共用体(Union) ,有时也被直译为...
-
0
容器指南之自定义 Confluence 容器镜像 精选 原创 Confluence 的安装配置操作步...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK