Last active
December 7, 2016 02:43
-
-
Save shinespark/3423d6eb79542a05a5562b1fb7645e40 to your computer and use it in GitHub Desktop.
Docker ComposeでConfluenceを構築する ref: http://qiita.com/shinespark/items/0a93b7aa1f28f56e18ee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -12,7 +12,10 @@ services: | |
confluence: | |
build: ./confluence | |
environment: | |
CONFLUENCE_HOSTNAME: "www.example.com" | |
CONFLUENCE_CATALINA_MEM: 2048 | |
+ extra_hosts: | |
+ - "www.example.com:127.0.0.1" | |
ports: | |
- '8090:8090' | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -22,7 +23,7 @@ ENV RUN_GROUP daemon | |
# directory structure. | |
RUN set -x \ | |
&& apt-get update --quiet \ | |
- && apt-get install --quiet --yes --no-install-recommends libtcnative-1 xmlstarlet \ | |
+ && apt-get install --quiet --yes --no-install-recommends libtcnative-1 xmlstarlet fonts-ipafont-gothic\ | |
&& apt-get clean \ | |
&& mkdir -p "${CONFLUENCE_HOME}" \ | |
&& chmod -R 700 "${CONFLUENCE_HOME}" \ | |
+# add font for macro title | |
+RUN mkdir -p "${JAVA_HOME}/lib/fonts/fallback" | |
+RUN ln -s /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf "${JAVA_HOME}/lib/fonts/fallback/ipag.ttf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
├── docker-compose.yml | |
├── data | |
│ └── confluence-home | |
├── confluence | |
│ ├── Dockerfile | |
│ ├── server.xml | |
│ └── setenv.sh | |
├── nginx | |
│ ├── Dockerfile | |
│ ├── conf.d | |
│ │ └── default.conf | |
│ └── nginx.conf | |
└── postgres | |
└── Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
keepalive_timeout 65; | |
client_max_body_size 30m; | |
gzip on; | |
gzip_types text/css text/javascript | |
application/x-javascript application/javascript | |
application/json; | |
gzip_min_length 1k; | |
gzip_disable "msie6"; | |
server { | |
listen 80; | |
location = / { | |
return 302 /confluence; | |
} | |
location / { | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://confluence:8090; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol"/> | |
+ <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="localhost" proxyPort="80"/> | |
<Engine name="Standalone" defaultHost="localhost"> | |
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false"> | |
- <Context path="" docBase="../confluence" reloadable="false" useHttpOnly="true"> | |
+ <Context path="/confluence" docBase="../confluence" reloadable="false" useHttpOnly="true"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -44,6 +44,9 @@ CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}" | |
CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}" | |
CATALINA_OPTS="-Xms${CONFLUENCE_CATALINA_MEM}m -Xmx${CONFLUENCE_CATALINA_MEM}m -XX:+UseG1GC ${CATALINA_OPTS}" | |
+# For macro titles | |
+CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=${JAVA_HOME}/lib/fonts/fallback ${CATALINA_OPTS}" | |
+CATALINA_OPTS="-Dconfluence.document.conversion.slides.defaultfontname.regular=IPAGothic -Dconfluence.document.conversion.slides.defaultfontname.asian=IPAGothic -Dconfluence.do | |
export CATALINA_OPTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment