This guide provides step-by-step instructions for deploying Atlassian Confluence using Docker Compose, including MySQL database setup, container health checks, and Atlassian product license activation.
This article was published 1097 days ago, some content may be outdated. If you have any questions, please leave a comment.
Required File Downloads:
1
2
wget https://minio-console.coderkang.top/files/atlassian-agent.jar
wget https://minio-console.coderkang.top/files/mysql-connector-j-8.3.0.jar
docker-compose.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version : '3.8'
name : atlassian
services :
confluence :
image : atlassian/confluence-server:8.5.2
container_name : atlassian-confluence
restart : always
environment :
- TZ=Asia/Shanghai
- JVM_MINIMUM_MEMORY=4096m
- JVM_MAXIMUM_MEMORY=8192m
- ATL_DB_TYPE=mysql
- ATL_JDBC_URL=jdbc:mysql://db:3306/confluence?sessionVariables=transaction_isolation='READ-COMMITTED'
- ATL_JDBC_USER=root
- ATL_JDBC_PASSWORD=******
- JAVA_OPTS='-javaagent:/opt/atlassian-agent.jar'
ports :
- 38090 : 8090
- 38091 : 8091
volumes :
- ./application-data/:/var/atlassian/application-data/confluence/
# - ./setenv.sh:/opt/atlassian/confluence/bin/setenv.sh
- ./atlassian-agent.jar:/opt/atlassian-agent.jar
- ./mysql-connector-j-8.3.0.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-j-8.3.0.jar
healthcheck :
test : [ "CMD" , "curl" , "-f" , "http://localhost:8090" ]
interval : 10s
timeout : 5s
retries : 5
start_period : 30s
depends_on :
db :
condition : service_healthy
db :
image : mysql:latest
container_name : atlassian-db
restart : always
environment :
MYSQL_ROOT_PASSWORD : ******
MYSQL_DATABASE : confluence
command : --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
volumes :
- ./application-db/data/:/var/lib/mysql/
- ./application-db/conf.d/:/etc/mysql/conf.d/
healthcheck :
test : [ "CMD" , "mysqladmin" , "ping" , "-h" , "localhost" , "-u" , "root" , "-p******" ]
interval : 10s
timeout : 5s
retries : 5
start_period : 30s
1
2
docker compose up -d
# The startup process may take some time as it needs to wait for the MySQL service to fully initialize
Access the webpage to obtain the Server ID.
1
2
3
4
docker compose exec -it confluence java -jar /opt/atlassian-agent.jar -m <Email> -n <Username> -o <Organization> -p conf -s '<Server ID>'
# Example:
# docker compose exec -it confluence java -jar /opt/atlassian-agent.jar -m CoderKang@hotmail.com -n CoderKang -o NiKo -p conf -s 'BHE8-N86V-SW29-TDDO'
Click “Next” after entering the information and wait…
If encountering issues during installation, after stopping the container:
Delete the application-db and application-data directories
Rebuild the container