Widget Connector | ||
---|---|---|
|
Info | |
---|---|
|
사전조건
Info |
---|
프로젝트 구조
Code Block |
---|
[root@centos7 confluence-docker-compose]# tree -a . ├── docker-compose.yml ├── .git ├── .env ├── .gitignore ├── mysql-data │ └── README.md ├── wiki-data │ └── README.md ├── mysql-driver │ └── mysql-connector-java-5.1.49-bin.jar ├── nginx │ └── conf.d │ └── default.conf ├── README.md └── ssl ├── fullchain.pem ├── privkey.pem └── README.md |
.env
Code Block |
---|
[root@centos7 confluence-docker-compose]# cat .env
COMPOSE_HTTP_TIMEOUT=200 |
nginx/conf.d/default.conf
Code Block |
---|
[root@centos7 confluence-docker-compose]# cat nginx/conf.d/default.conf
client_max_body_size 100M;
upstream app {
server confluence:8090;
}
server {
listen 80;
server_name confluence.iisanse.com;
return 301 https://confluence.iisanse.com;
}
server{
listen 443;
server_name confluence.iisanse.com;
ssl on;
ssl_certificate /etc/nginx/ssl/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://app;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
send_timeout 300s;
}
}
|
docker-compose.yml
Code Block |
---|
version: "3.4"
services:
nginx:
image: nginx:1.19.3
restart: always
container_name: nginx-1.19.3
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- ./ssl/fullchain.pem:/etc/nginx/ssl/fullchain.pem
- ./ssl/privkey.pem:/etc/nginx/ssl/privkey.pem
links:
- confluence
depends_on:
- confluence
confluence:
image: atlassian/confluence-server:7.4.5 #서버로 사용할 버전 명시 가장 최신은 latest로 하면 됩니다.
restart: always
container_name: confluence-7.4.5
environment:
JVM_MINIMUM_MEMORY: 2048m #default메모리는 1g입니다. 서버환경에 따라 증감합니다.
JVM_MAXIMUM_MEMORY: 2048m #default메모리는 1g입니다. 서버환경에 따라 증감합니다.
ATL_PROXY_NAME: confluence.iisanse.com
ATL_PROXY_PORT: 443
ATL_TOMCAT_SCHEME: https
ATL_TOMCAT_SECURE: "true"
ports:
- "8090:8090" #host 포트는 8090이고, container포트는 8090입니다.
- "8091:8091" #confluence 공동작업을 위한 포트 입니다.
volumes:
- ./wiki-data:/var/atlassian/application-data/confluence #host dir:container dir 입니다.
- ./mysql-driver/mysql-connector-java-5.1.49-bin.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-5.1.49-bin.jar
links:
- mysql # mysql와 연결을 설정합니다. db hosts 가 됩니다.
depends_on:
- mysql
mysql:
image: mysql:5.7
restart: always
container_name: mysql-5.7
environment:
MYSQL_DATABASE: "confluencedb"
MYSQL_USER: "dbuser"
MYSQL_PASSWORD: "dbpassword"
MYSQL_ROOT_PASSWORD: "root"
TZ: "Asia/Seoul"
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_bin
- --default-storage-engine=INNODB
- --max_allowed_packet=256M
- --transaction-isolation=READ-COMMITTED
- --innodb_log_file_size=2G
- --binlog_format=row
ports:
- "3306:3306" # mysql의 포트 입니다.
volumes:
- ./mysql-data:/var/lib/mysql
adminer:
image: adminer
container_name: adminer
ports:
- 8081:8080 |
Refference
Info |
---|
DockerHub Mysql Menual Confluence Database Setup |
멀티 컨테이너 실행
Code Block |
---|
[root@centos7 confluence-docker-compose]# docker-compose up -d
Creating network "confluence-docker-compose_default" with the default driver
Creating mysql-5.7 ... done
Creating adminer ... done
Creating confluence-7.4.5 ... done
Creating nginx-1.19.3 ... done ssl certification |