Control replication `mirror` option from Docker Compose Adds suport for `MIRROR` environment varialbe to control replication `remote.mirror` behaviour. This simplify testing of replication mirroring. Change-Id: I0b82d7166a2e0936999ff58a83003a27d392983b
diff --git a/example-setup/broker/configs/replication.config.template b/example-setup/broker/configs/replication.config.template index e77edeb..92047f8 100644 --- a/example-setup/broker/configs/replication.config.template +++ b/example-setup/broker/configs/replication.config.template
@@ -14,7 +14,7 @@ url = http://$REMOTE_URL:8080/#{name}#.git apiUrl = http://$REMOTE_URL:8080/ fetch = +refs/*:refs/* - mirror = true + mirror = $MIRROR timeout = 60 # In seconds connectionTimeout = 120000 # In mseconds rescheduleDelay = 15
diff --git a/example-setup/broker/docker-compose.yaml b/example-setup/broker/docker-compose.yaml index 705aea6..5d2e68a 100644 --- a/example-setup/broker/docker-compose.yaml +++ b/example-setup/broker/docker-compose.yaml
@@ -11,6 +11,7 @@ - BROKER_HOST=broker - BROKER_PORT=9092 - REPLICATE_ON_STARTUP=false + - MIRROR=true ports: - "8080:8080" - "29418:29418" @@ -28,6 +29,7 @@ - BROKER_HOST=broker - BROKER_PORT=9092 - REPLICATE_ON_STARTUP=true + - MIRROR=true ports: - "8081:8080" - "29419:29418"
diff --git a/example-setup/http/configs/replication.config.template b/example-setup/http/configs/replication.config.template index 6768146..53809ca 100644 --- a/example-setup/http/configs/replication.config.template +++ b/example-setup/http/configs/replication.config.template
@@ -13,7 +13,7 @@ url = http://$REMOTE_URL:8080/#{name}#.git apiUrl = http://$REMOTE_URL:8080 fetch = +refs/*:refs/* - mirror = true + mirror = $MIRROR timeout = 60 # In seconds connectionTimeout = 120000 # In mseconds rescheduleDelay = 15
diff --git a/example-setup/http/docker-compose.yaml b/example-setup/http/docker-compose.yaml index ccb6b86..62fed3c 100644 --- a/example-setup/http/docker-compose.yaml +++ b/example-setup/http/docker-compose.yaml
@@ -9,6 +9,7 @@ - REMOTE_URL=gerrit2 - DEBUG_PORT=5005 - REPLICATE_ON_STARTUP=false + - MIRROR=true ports: - "8080:8080" - "29418:29418" @@ -22,6 +23,7 @@ - REMOTE_URL=gerrit1 - DEBUG_PORT=5006 - REPLICATE_ON_STARTUP=true + - MIRROR=true ports: - "8081:8080" - "29419:29418"