[download-web/mirrorbits] Install customized mirrorbits config



commit d3a8a3a40c88a09b2971c79478028a723065ce2f
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Mon Dec 7 15:43:49 2020 +0100

    Install customized mirrorbits config

 Dockerfile      |  3 ++-
 mirrorbits.conf | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)
---
diff --git a/Dockerfile b/Dockerfile
index e07ee97..055369b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,8 +21,9 @@ RUN apt-get update -y && \
 
 COPY --from=builder /go/bin/geoipupdate /usr/local/bin/
 COPY --from=builder /go/mirrorbits/bin/mirrorbits /usr/local/bin/
-COPY --from=builder /go/mirrorbits/mirrorbits.conf /etc/mirrorbits.conf
+
 RUN install -d /usr/share/GeoIP
 ADD entrypoint.sh /entrypoint.sh
+ADD mirrorbits.conf /etc/mirrorbits.conf
 
 ENTRYPOINT ["/entrypoint.sh"]
diff --git a/mirrorbits.conf b/mirrorbits.conf
new file mode 100644
index 0000000..4821918
--- /dev/null
+++ b/mirrorbits.conf
@@ -0,0 +1,73 @@
+Repository: /srv/ftp
+RedisAddress: redis.download-web.svc.cluster.local:6379
+
+## A local path or URL containing the JavaScript used by the templates.
+## If this is not set (the default), the JavaScript will just be loaded
+## from the usual CDNs. See also `contrib/localjs/fetchfiles.sh`.
+# LocalJSPath:
+
+## OutputMode can take on the three values:
+##  - redirect: HTTP redirect to the destination file on the selected mirror
+##  - json: return a json document for pre-treatment by an application
+##  - auto: based on the Accept HTTP header
+OutputMode: auto
+
+
+## Interval between two scans of the local repository.
+## The repository scan will index new and removed files and collect file
+## sizes and checksums.
+## This should, more or less, match the frequency where the local repo
+## is updated.
+RepositoryScanInterval: 10
+
+## Enable or disable specific hashing algorithms
+Hashes:
+    SHA256: On
+    SHA1: Off
+    MD5: Off
+
+###################
+##### MIRRORS #####
+###################
+
+## Maximum number of concurrent mirror synchronization to do (rsync/ftp) 
+# ConcurrentSync: 5
+
+## Interval in minutes between mirror scan
+# ScanInterval: 30
+
+## Interval in minutes between mirrors HTTP health checks
+# CheckInterval: 1
+
+## Allow a mirror to issue an HTTP redirect.
+## Setting this to true will disable the mirror if a redirect is detected.
+DisallowRedirects: true
+
+## Disable a mirror if an active file is missing (HTTP 404)
+DisableOnMissingFile: true
+
+## Adjust the weight/range of the geographic distribution
+# WeightDistributionRange: 1.5
+
+## Maximum number of alternative links to return in the HTTP header
+# MaxLinkHeaders: 10
+
+## Automatically fix timezone offsets.
+## Enable this if one or more mirrors are always excluded because their
+## last-modification-time mismatch. This option will try to guess the
+## offset and adjust the mod time accordingly.
+## Affected mirrors will need to be rescanned after enabling this feature.
+FixTimezoneOffsets: true
+
+## List of mirrors to use as fallback which will be used in case mirrorbits
+## is unable to answer a request because the database is unreachable.
+## Note: Mirrorbits will redirect to one of these mirrors based on the user
+## location but won't be able to know if the mirror has the requested file.
+## Therefore only put your most reliable and up-to-date mirrors here.
+Fallbacks:
+    - URL: https://ftp.acc.umu.se/pub/GNOME/
+      CountryCode: se
+      ContinentCode: eu
+    - URL: https://ftp-osl.osuosl.org/pub/gnome/
+      CountryCode: us
+      ContinentCode: na


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]