blob: b15684d48be9f7fe67c6c46882ed1c4cbb07c825 [file] [log] [blame]
version: '3'
services:
gerrit-1:
build: ./gerrit-1
networks:
gerrit-net:
environment:
INIT: ${INIT:-1}
volumes:
- ./gerrit-1/git:/var/gerrit/git
- ./gerrit-1/logs:/var/gerrit/logs
- ./gerrit-1/ssh:/var/gerrit/.ssh
- ./gerrit-1/index:/var/gerrit/index
- ./gerrit-1/data:/var/gerrit/data
- ./gerrit-1/etc:/var/gerrit/etc
- ./gerrit-1/db:/var/gerrit/db
- ./gerrit-1/plugins:/var/gerrit/plugins
- ./gerrit-1/lib:/var/gerrit/lib
- ./gerrit-1/tmp:/var/gerrit/tmp
- ./gerrit-common/shared-dir:/var/gerrit/shared-dir
ports:
- "39418:29418"
- "8081:8080"
depends_on:
- sshd
- zookeeper
- kafka-broker
container_name: gerrit-1
gerrit-2:
build: ./gerrit-2
networks:
gerrit-net:
environment:
INIT: ${INIT:-1}
volumes:
- ./gerrit-2/git:/var/gerrit/git
- ./gerrit-2/logs:/var/gerrit/logs
- ./gerrit-2/ssh:/var/gerrit/.ssh
- ./gerrit-2/index:/var/gerrit/index
- ./gerrit-2/data:/var/gerrit/data
- ./gerrit-2/etc:/var/gerrit/etc
- ./gerrit-2/db:/var/gerrit/db
- ./gerrit-2/plugins:/var/gerrit/plugins
- ./gerrit-2/lib:/var/gerrit/lib
- ./gerrit-2/tmp:/var/gerrit/tmp
- ./gerrit-common/shared-dir:/var/gerrit/shared-dir
ports:
- "49418:29418"
- "8082:8080"
depends_on:
- sshd
- zookeeper
- kafka-broker
container_name: gerrit-2
sshd:
build: ./sshd
networks:
gerrit-net:
volumes:
- ./gerrit-2/git:/var/gerrit-2/git
- ./gerrit-2/ssh:/root/.ssh
- ./gerrit-1/git:/var/gerrit-1/git
container_name: sshd
zookeeper:
image: wurstmeister/zookeeper:latest
networks:
gerrit-net:
ports:
- "2181:2181"
kafka-broker:
image: wurstmeister/kafka:2.12-2.1.0
networks:
gerrit-net:
ports:
- "9092:9092"
container_name: kafka-broker
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka-broker
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
haproxy:
build: haproxy
ports:
- "8080:8080"
- "29418:29418"
networks:
gerrit-net:
depends_on:
- syslog-sidecar
- gerrit-1
- gerrit-2
environment:
- SYSLOG_SIDECAR=syslog-sidecar
- GERRIT_1=gerrit-1
- GERRIT_1_SSH=29418
- GERRIT_1_HTTP=8080
- GERRIT_2=gerrit-2
- GERRIT_2_SSH=29418
- GERRIT_2_HTTP=8080
- HAPROXY_HTTP_PORT=8080
- HAPROXY_SSH_PORT=29418
syslog-sidecar:
image: balabit/syslog-ng:3.19.1
volumes:
- "./syslog-sidecar/logs:/var/log/syslog-ng"
- "./syslog-sidecar/socket:/var/run/syslog-ng"
- "./syslog-sidecar/config/:/etc/syslog-ng"
networks:
gerrit-net:
networks:
gerrit-net:
driver: bridge