Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
            - --sql_mode=NO_AUTO_VALUE_ON_ZERO
            - --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


멀티 컨테이너 실행

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