summaryrefslogblamecommitdiffstats
path: root/docker-compose.yml
blob: 26a9f15726f45eda7201167e081d3de4ec982af9 (plain) (tree)
1
2
3
4
5
6




                                     
                                                    

































                                                                                              



                                              


                             
                 





                                                   
                                                      




                                                            







                                                       
                 
                 




                                                     
                                                        


                                             
                                                             


                                                            
                 
                 







                                                       

                                  
                      

                                                                  



                           



                                                       
version: "3"
services:
    master-server:
        container_name: master-server
        image: master-server:latest
        hostname: master-server.${BWLP_NETWORK_NAME}
        build:
            context: .
            dockerfile: pkg/docker/master-server_dockerfile
            args:
                MASTER_SERVER_FILE: target/image-master-1.0-SNAPSHOT-jar-with-dependencies.jar
                MASTER_CONFIG_FILE_GLOBAL: config/global.properties.tmpl
                MASTER_CONFIG_FILE_DATABASE: config/mysql.properties.tmpl
                MASTER_VSTORE_PATH: ${MASTER_SERVER_STORAGE}
                MASTER_KEYSTORE_FILE: ${MASTER_KEYSTORE_FILE}
                MASTER_KEYSTORE_ALIAS: ${MASTER_KEYSTORE_ALIAS}
                MASTER_KEYSTORE_KEY_SIZE: ${MASTER_KEYSTORE_KEY_SIZE}
                MASTER_KEYSTORE_PASSWORD: ${MASTER_KEYSTORE_PASSWORD}
                MASTER_FILE_TRANSFER_PORT_PLAIN: ${MASTER_FILE_TRANSFER_PORT_PLAIN}
                MASTER_FILE_TRANSFER_PORT_SSL: ${MASTER_FILE_TRANSFER_PORT_SSL}
                MASTER_THRIFT_PORT_PLAIN: ${MASTER_THRIFT_PORT_PLAIN}
                MASTER_THRIFT_PORT_SSL: ${MASTER_THRIFT_PORT_SSL}
        environment:
            MASTER_DATABASE_NAME: ${MASTER_DATABASE_NAME}
            MASTER_DATABASE_HOST: ${MASTER_DATABASE_IPV4}
            MASTER_DATABASE_USER: ${MASTER_DATABASE_USER}
            MASTER_DATABASE_PASSWORD: ${MASTER_DATABASE_PASSWORD}
            MASTER_VSTORE_PATH: ${MASTER_SERVER_STORAGE}
            MASTER_SESSION_TIMEOUT_USER: 7200
            MASTER_SESSION_TIMEOUT_SERVER: 86400
            MASTER_KEYSTORE_FILE: ${MASTER_KEYSTORE_FILE}
            MASTER_KEYSTORE_ALIAS: ${MASTER_KEYSTORE_ALIAS}
            MASTER_KEYSTORE_PASSWORD: ${MASTER_KEYSTORE_PASSWORD}
            MASTER_FILE_TRANSFER_PORT_PLAIN: ${MASTER_FILE_TRANSFER_PORT_PLAIN}
            MASTER_FILE_TRANSFER_PORT_SSL: ${MASTER_FILE_TRANSFER_PORT_SSL}
            MASTER_FILE_TRANSFER_TIMEOUT: 60
            MASTER_FILE_TRANSFER_RETRIES: 4
            MASTER_THRIFT_PORT_PLAIN: ${MASTER_THRIFT_PORT_PLAIN}
            MASTER_THRIFT_PORT_SSL: ${MASTER_THRIFT_PORT_SSL}
        volumes:
            - type: volume
              source: master-server
              target: ${MASTER_SERVER_STORAGE}
              read_only: false
        depends_on:
            - master-database
        networks:
            bwlp:
                ipv4_address: ${MASTER_SERVER_IPV4}
                ipv6_address: ${MASTER_SERVER_IPV6}
    master-database:
        container_name: master-database
        image: mariadb:latest
        restart: on-failure
        hostname: master-database.${BWLP_NETWORK_NAME}
        environment:
            TZ: Europe/Berlin
            MYSQL_DATABASE: ${MASTER_DATABASE_NAME}
            MYSQL_ROOT_PASSWORD: ${MASTER_DATABASE_PASSWORD}
        volumes:
            - type: volume
              source: master-database
              target: /var/lib/mysql
              read_only: false
            - type: bind
              source: ./${MASTER_DATABASE_DATASET_PATH}
              target: /docker-entrypoint-initdb.d
              read_only: true
        networks:
            bwlp:
                ipv4_address: ${MASTER_DATABASE_IPV4}
                ipv6_address: ${MASTER_DATABASE_IPV6}
    master-phpmyadmin:
        container_name: master-phpmyadmin
        image: phpmyadmin:latest
        hostname: master-phpmyadmin.${BWLP_NETWORK_NAME}
        restart: on-failure
        environment:
            PMA_HOST: ${MASTER_DATABASE_IPV4}
            PMA_VERBOSE: master-database.${BWLP_NETWORK_NAME}
            MYSQL_ROOT_PASSWORD: ${MASTER_DATABASE_PASSWORD}
        depends_on:
            - master-database
        networks:
            bwlp:
                ipv4_address: ${MASTER_PHPMYADMIN_IPV4}
                ipv6_address: ${MASTER_PHPMYADMIN_IPV6}
volumes:
    master-server:
        name: master-server
    master-database:
        name: master-database
networks:
    bwlp:
        name: ${BWLP_NETWORK_NAME}
        driver: bridge
        driver_opts:
            com.docker.network.bridge.name: br${BWLP_NETWORK_NAME}
        enable_ipv6: true
        ipam:
            driver: default
            config:
                - subnet: ${BWLP_NETWORK_IPV4}
                  gateway: ${BWLP_NETWORK_IPV4_GATEWAY}
                - subnet: ${BWLP_NETWORK_IPV6}
                  gateway: ${BWLP_NETWORK_IPV6_GATEWAY}