summaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
blob: 26a9f15726f45eda7201167e081d3de4ec982af9 (plain) (blame)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
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}