From 2eaf0e6385c5aea6661741955534703c39088b74 Mon Sep 17 00:00:00 2001 From: crabbey Date: Fri, 28 Feb 2020 13:01:21 +0000 Subject: [PATCH 01/28] Added restart: unless-stopped to bring containers up on reboot --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 65e6938..38cb8aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,16 +3,19 @@ services: dns: image: lancachenet/lancache-dns:latest env_file: .env +# restart: unless-stopped ports: - ${DNS_BIND_IP}:53:53/udp sniproxy: image: lancachenet/sniproxy:latest env_file: .env +# restart: unless-stopped ports: - 443:443/tcp monolithic: image: lancachenet/monolithic:latest env_file: .env +# restart: unless-stopped ports: - 80:80/tcp volumes: From be1ee34587972078f0642bbc86a328cfb0b88b48 Mon Sep 17 00:00:00 2001 From: Barry Zubel Date: Wed, 13 May 2020 16:45:09 +0100 Subject: [PATCH 02/28] Clarify some settings. here be dragons etc. --- .env | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 40a3238..71255bd 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ USE_GENERIC_CACHE=true ## IP addresses that the lancache monolithic instance is reachable on -## Specify one or more IPs, space separated - these will be used when resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam)## IP Address that the lancache monolithic instance will run on +## Specify one or more IPs, space separated - these will be used when resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam) ## Note: This setting only affects DNS, monolithic and sniproxy will still bind to all IPs by default LANCACHE_IP=10.0.39.1 @@ -19,14 +19,17 @@ UPSTREAM_DNS=8.8.8.8 ## Note that by default, this will be a folder relative to the docker-compose.yml file CACHE_ROOT=./lancache -## Change this to customise the size of the memory cache (default 500m) -CACHE_MEM_SIZE=500m - ## Change this to customise the size of the disk cache (default 1000000m) ## If you have more storage, you'll likely want to increase this ## The cache server will prune content on a least-recently-used basis if it -## starts approaching this limit +## starts approaching this limit. +## Set this to a little bit less than your actual available space CACHE_DISK_SIZE=1000000m +## Change this to customise the size of the nginx cache manager (default 500m) +## DO NOT CHANGE THIS LIGHTLY. The defaults are enough to address 8TB of cache storage. Increasing +## this value will cause performance problems, and may cause the cache to fail to start entirely. +CACHE_MEM_SIZE=500m + ## Change this to limit the maximum age of cached content (default 3650d) -CACHE_MAX_AGE=3650d \ No newline at end of file +CACHE_MAX_AGE=3650d From 88d67f28811d3f8e92a1cceec9cfb8484c6916c4 Mon Sep 17 00:00:00 2001 From: Jorgen1040 Date: Fri, 31 Jul 2020 05:59:20 +0200 Subject: [PATCH 03/28] Added TZ variable to .env file --- .env | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.env b/.env index 71255bd..4cefaf8 100644 --- a/.env +++ b/.env @@ -33,3 +33,7 @@ CACHE_MEM_SIZE=500m ## Change this to limit the maximum age of cached content (default 3650d) CACHE_MAX_AGE=3650d + +## Set the timezone for the docker containers, useful for correct timestamps on logs (default Europe/London) +## Formatted as tz database names. Example: Europe/Oslo or America/Los_Angeles +TZ=Europe/London \ No newline at end of file From 8702288f81f6d7d04381cca57e04a090c8d2572f Mon Sep 17 00:00:00 2001 From: Jorgen1040 Date: Fri, 31 Jul 2020 06:02:21 +0200 Subject: [PATCH 04/28] Added TZ based on .env variable to docker-compose.yml --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 38cb8aa..2135589 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,12 +6,16 @@ services: # restart: unless-stopped ports: - ${DNS_BIND_IP}:53:53/udp + environment: + - TZ=${TZ} sniproxy: image: lancachenet/sniproxy:latest env_file: .env # restart: unless-stopped ports: - 443:443/tcp + environment: + - TZ=${TZ} monolithic: image: lancachenet/monolithic:latest env_file: .env @@ -21,3 +25,5 @@ services: volumes: - ${CACHE_ROOT}/cache:/data/cache - ${CACHE_ROOT}/logs:/data/logs + environment: + - TZ=${TZ} From 393a8754713de2329cf68e3f14f031c32b1b1e72 Mon Sep 17 00:00:00 2001 From: crabbey Date: Mon, 24 Aug 2020 22:22:39 +0100 Subject: [PATCH 05/28] Add TCP binding for DNS --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 38cb8aa..a7f4aa0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,7 @@ services: # restart: unless-stopped ports: - ${DNS_BIND_IP}:53:53/udp + - ${DNS_BIND_IP}:53:53/tcp sniproxy: image: lancachenet/sniproxy:latest env_file: .env From c360c87ae04c3955371f69a39b5e999b762ca889 Mon Sep 17 00:00:00 2001 From: Jorgen1040 Date: Sun, 20 Sep 2020 00:36:05 +0200 Subject: [PATCH 06/28] Add TZ to README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 227aa08..463fcfc 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,11 @@ This setting allows you to control the maximum duration cached data will be kept > **Note:** this must be given as a number of days in age before expiry, with a `d` suffix (e.g. the default value, `3650d`). +## `TZ` +This setting allows you to set the timezone that is used by the docker containers. Most notably changing the timestamps of the logs. Useful for debugging without having to think sometimes multiple hours in the future/past. + +For a list of all timezones see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. + # More information The LanCache docker-stack is generated automatically from the data over at [UKLans](https://github.com/uklans/cache-domains). All services that are listed in the UKLans repository are available and supported inside this docker-compose. From ec2706110d2ef433cfb4afc0ea2d3d528188afdc Mon Sep 17 00:00:00 2001 From: VibroAxe Date: Fri, 25 Sep 2020 18:20:53 +0000 Subject: [PATCH 07/28] Switched to stream images Switched to stream images for testing and removed references to sniproxy --- docker-compose.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a7f4aa0..672789c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,18 +7,19 @@ services: ports: - ${DNS_BIND_IP}:53:53/udp - ${DNS_BIND_IP}:53:53/tcp - sniproxy: - image: lancachenet/sniproxy:latest - env_file: .env +# sniproxy: +# image: lancachenet/sniproxy:latest +# env_file: .env # restart: unless-stopped - ports: - - 443:443/tcp +# ports: +# - 443:443/tcp monolithic: - image: lancachenet/monolithic:latest + image: lancachenet/monolithic:stream env_file: .env # restart: unless-stopped ports: - 80:80/tcp + - 443:443/tcp volumes: - ${CACHE_ROOT}/cache:/data/cache - ${CACHE_ROOT}/logs:/data/logs From 03382e54e20fe2500a26481c5331036978e5536b Mon Sep 17 00:00:00 2001 From: Mathew Burnett Date: Fri, 13 Nov 2020 15:02:52 +0000 Subject: [PATCH 08/28] update script now removes orphans --- docker-compose.yml | 5 +++++ update_containers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 672789c..d18bd91 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,12 +7,17 @@ services: ports: - ${DNS_BIND_IP}:53:53/udp - ${DNS_BIND_IP}:53:53/tcp + +## HTTPS requests are now handled in monolithic directly +## you could choose to return to sniproxy if desired +# # sniproxy: # image: lancachenet/sniproxy:latest # env_file: .env # restart: unless-stopped # ports: # - 443:443/tcp + monolithic: image: lancachenet/monolithic:stream env_file: .env diff --git a/update_containers.sh b/update_containers.sh index 291993a..b54e667 100644 --- a/update_containers.sh +++ b/update_containers.sh @@ -2,4 +2,4 @@ docker-compose pull -docker-compose up -d +docker-compose up -d --remove-orphans From f1b183b6181f34bbc95faea7a5685939e4009e49 Mon Sep 17 00:00:00 2001 From: James Kinsman Date: Fri, 13 Nov 2020 15:19:37 +0000 Subject: [PATCH 09/28] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d18bd91..b87d861 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: # - 443:443/tcp monolithic: - image: lancachenet/monolithic:stream + image: lancachenet/monolithic:latest env_file: .env # restart: unless-stopped ports: From 0d48e54bdd359fbeed2519c0538276fd7c3998b7 Mon Sep 17 00:00:00 2001 From: Jorgen1040 <26395020+Jorgen1040@users.noreply.github.com> Date: Thu, 7 Jan 2021 12:23:57 +0100 Subject: [PATCH 10/28] Remove unnecessary variables --- docker-compose.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 53b627b..cf60a36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,4 @@ services: - 443:443/tcp volumes: - ${CACHE_ROOT}/cache:/data/cache - - ${CACHE_ROOT}/logs:/data/logs - environment: - - TZ=${TZ} + - ${CACHE_ROOT}/logs:/data/logs \ No newline at end of file From 404b8867df46c1e5e3d90b1bfcacf017dcd5f48a Mon Sep 17 00:00:00 2001 From: James Kinsman Date: Fri, 15 Jan 2021 14:03:23 +0000 Subject: [PATCH 11/28] Create stale.yml --- .github/stale.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..9dbb27e --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,2 @@ +#Inherit for lancachenet/.github +_extends: .github From 34afcf00ef4061456397d23a2962785a60d93767 Mon Sep 17 00:00:00 2001 From: James Kinsman Date: Sat, 9 Oct 2021 13:16:21 +0100 Subject: [PATCH 12/28] Update .env Updated CACHE_MEM_SIZE to CACHE_INDEX_SIZE --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 4cefaf8..d71cc50 100644 --- a/.env +++ b/.env @@ -29,11 +29,11 @@ CACHE_DISK_SIZE=1000000m ## Change this to customise the size of the nginx cache manager (default 500m) ## DO NOT CHANGE THIS LIGHTLY. The defaults are enough to address 8TB of cache storage. Increasing ## this value will cause performance problems, and may cause the cache to fail to start entirely. -CACHE_MEM_SIZE=500m +CACHE_INDEX_SIZE=500m ## Change this to limit the maximum age of cached content (default 3650d) CACHE_MAX_AGE=3650d ## Set the timezone for the docker containers, useful for correct timestamps on logs (default Europe/London) ## Formatted as tz database names. Example: Europe/Oslo or America/Los_Angeles -TZ=Europe/London \ No newline at end of file +TZ=Europe/London From a940302ed034426f8c45783e310195ec41dff8bb Mon Sep 17 00:00:00 2001 From: James Kinsman Date: Sat, 5 Mar 2022 15:54:05 +0000 Subject: [PATCH 13/28] Clarify CACHE_INDEX requirements --- .env | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.env b/.env index d71cc50..80b25f1 100644 --- a/.env +++ b/.env @@ -19,16 +19,15 @@ UPSTREAM_DNS=8.8.8.8 ## Note that by default, this will be a folder relative to the docker-compose.yml file CACHE_ROOT=./lancache -## Change this to customise the size of the disk cache (default 1000000m) +## Change this to customise the size of the disk cache (default 2000000m) ## If you have more storage, you'll likely want to increase this ## The cache server will prune content on a least-recently-used basis if it ## starts approaching this limit. ## Set this to a little bit less than your actual available space -CACHE_DISK_SIZE=1000000m +CACHE_DISK_SIZE=2000000m -## Change this to customise the size of the nginx cache manager (default 500m) -## DO NOT CHANGE THIS LIGHTLY. The defaults are enough to address 8TB of cache storage. Increasing -## this value will cause performance problems, and may cause the cache to fail to start entirely. +## Change this to allow sufficient index memory for the nginx cache manager (default 500m) +## We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE CACHE_INDEX_SIZE=500m ## Change this to limit the maximum age of cached content (default 3650d) From 45bad4db492a7fdbf8bcc9b24113907fc4f62d85 Mon Sep 17 00:00:00 2001 From: James Kinsman Date: Sat, 5 Mar 2022 16:31:21 +0000 Subject: [PATCH 14/28] Update README.md to reflect CACHE_INDEX_SIZE changes --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 463fcfc..f09d2ae 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,6 @@ The `CACHE_ROOT` should either be on a separate partition, or ideally on separat > **Note:** this setting defaults to `./lancache`. Unless your cache storage lives here, you probably want to change this value. -## `CACHE_MEM_SIZE` -This controls the size of the memory cache used by the cache server. The default should suffice for almost all configurations. - -> **Note:** this setting does not limit the amount of memory that the Linux host will use for page caches, only what the cache server will use itself - see the Docker documentation on limiting memory consumption for a container if you wish to constrain the total memory consumption of the cache server, but generally you want as much memory as possible on your cache server to be used to store hot data. - ## `CACHE_DISK_SIZE` This setting will constrain the upper limit of space used by cached data. You generally want to leave a small gap (10-20GB at least) between the size listed here and the available storage space used for the cached data, just in case. @@ -62,6 +57,12 @@ The cache server will automatically cached data when the total stored amount app > **Note:** that this must be given in megabytes with an `m` suffix (e.g. the default value, `1000000m`). +## `CACHE_INDEX_SIZE` +Change this to allow sufficient index memory for the nginx cache manager (default 500m) +We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE + +> **Note:** this setting does not limit the amount of memory that the Linux host will use for page caches, only what the cache server will use itself - see the Docker documentation on limiting memory consumption for a container if you wish to constrain the total memory consumption of the cache server, but generally you want as much memory as possible on your cache server to be used to store hot data. + ## `CACHE_MAX_AGE` This setting allows you to control the maximum duration cached data will be kept for. The default should be fine for most use cases - the `CACHE_DISK_SIZE` setting will generally be used before this for aging out data. From 5c8925ea7158e4d90fa10e238ed4d489575096a2 Mon Sep 17 00:00:00 2001 From: Eric Wolf <19wolf@gmail.com> Date: Thu, 24 Mar 2022 16:51:34 -0400 Subject: [PATCH 15/28] Fix spelling error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f09d2ae..65312ae 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ The `CACHE_ROOT` should either be on a separate partition, or ideally on separat ## `CACHE_DISK_SIZE` This setting will constrain the upper limit of space used by cached data. You generally want to leave a small gap (10-20GB at least) between the size listed here and the available storage space used for the cached data, just in case. -The cache server will automatically cached data when the total stored amount approaches this limit, in a least-recently-used fashion (oldest data, least accessed deleted first). +The cache server will automatically delete cached data when the total stored amount approaches this limit, in a least-recently-used fashion (oldest data, least accessed deleted first). > **Note:** that this must be given in megabytes with an `m` suffix (e.g. the default value, `1000000m`). From 6f2ea2016a677fb93329825948f3f62538110d15 Mon Sep 17 00:00:00 2001 From: James Kinsman Date: Tue, 28 Jun 2022 15:49:01 +0100 Subject: [PATCH 16/28] Create enable_autostart.sh Simple script to enable autostart for the containers --- enable_autostart.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 enable_autostart.sh diff --git a/enable_autostart.sh b/enable_autostart.sh new file mode 100644 index 0000000..2d2d76b --- /dev/null +++ b/enable_autostart.sh @@ -0,0 +1,3 @@ +#!/bin/bash + + sed -i 's/# restart: unless-stopped/ restart: unless-stopped/g' docker-compose.yml From 7a7d17614df3d09967e0f0276b71121395e0fa90 Mon Sep 17 00:00:00 2001 From: VibroAxe Date: Tue, 28 Jun 2022 15:51:11 +0100 Subject: [PATCH 17/28] Added enable_autostart.sh Added enable_autostart.sh to update docker-compose to remove the # from restart: lines Removed sniproxy to simplify script --- README.md | 4 +++- docker-compose.yml | 12 +----------- enable_autostart.sh | 3 ++- 3 files changed, 6 insertions(+), 13 deletions(-) mode change 100644 => 100755 enable_autostart.sh diff --git a/README.md b/README.md index 65312ae..fe1d59b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ ![Docker Pulls](https://img.shields.io/docker/pulls/lancachenet/monolithic?label=Monolithic) ![Docker Pulls](https://img.shields.io/docker/pulls/lancachenet/lancache-dns?label=Lancache-dns) ![Docker Pulls](https://img.shields.io/docker/pulls/lancachenet/sniproxy?label=Sniproxy) ![Docker Pulls](https://img.shields.io/docker/pulls/lancachenet/generic?label=Generic) -This docker-compose is meant as an example for running our lancache stack, It will run out of the box with minimal changes to the `.env` file for your local IP address. +This docker-compose is meant as an example for running our lancache stack, It will run out of the box with minimal changes to the `.env` file for your local IP address and disk settings. + +Once (and only once) you have a working system run `sudo ./enable_autostart.sh` to allow the containers to run at system startup # Settings > You *MUST* set at least `LANCACHE_IP` and `DNS_BIND_IP`. It is highly recommended that you change `CACHE_ROOT` to a folder of your choosing, and set [`CACHE_DISK_SIZE`](#cache_disk_size) to a value that suits your storage capacity. diff --git a/docker-compose.yml b/docker-compose.yml index cf60a36..119dc23 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,16 +8,6 @@ services: - ${DNS_BIND_IP}:53:53/udp - ${DNS_BIND_IP}:53:53/tcp -## HTTPS requests are now handled in monolithic directly -## you could choose to return to sniproxy if desired -# -# sniproxy: -# image: lancachenet/sniproxy:latest -# env_file: .env -# restart: unless-stopped -# ports: -# - 443:443/tcp - monolithic: image: lancachenet/monolithic:latest env_file: .env @@ -27,4 +17,4 @@ services: - 443:443/tcp volumes: - ${CACHE_ROOT}/cache:/data/cache - - ${CACHE_ROOT}/logs:/data/logs \ No newline at end of file + - ${CACHE_ROOT}/logs:/data/logs diff --git a/enable_autostart.sh b/enable_autostart.sh old mode 100644 new mode 100755 index 2d2d76b..49121f6 --- a/enable_autostart.sh +++ b/enable_autostart.sh @@ -1,3 +1,4 @@ #!/bin/bash - sed -i 's/# restart: unless-stopped/ restart: unless-stopped/g' docker-compose.yml +sed -i 's/# restart: unless-stopped/ restart: unless-stopped/g' docker-compose.yml +docker-compose up -d From 3aecf2503f8182009d2139b7d28550b83f373d92 Mon Sep 17 00:00:00 2001 From: VibroAxe Date: Tue, 28 Jun 2022 16:34:50 +0100 Subject: [PATCH 18/28] Switch to using YAML anchors Simplifies script and file, no need to remove sniproxy at this time --- docker-compose.yml | 15 +++++++++++++-- enable_autostart.sh | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 119dc23..e0b39ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,28 @@ version: '2' +x-restart-policy: &restart-policy "no" services: dns: image: lancachenet/lancache-dns:latest env_file: .env -# restart: unless-stopped + restart: *restart-policy ports: - ${DNS_BIND_IP}:53:53/udp - ${DNS_BIND_IP}:53:53/tcp +## HTTPS requests are now handled in monolithic directly +## you could choose to return to sniproxy if desired +# +# sniproxy: +# image: lancachenet/sniproxy:latest +# env_file: .env +# restart: *restart-policy +# ports: +# - 443:443/tcp + monolithic: image: lancachenet/monolithic:latest env_file: .env -# restart: unless-stopped + restart: *restart-policy ports: - 80:80/tcp - 443:443/tcp diff --git a/enable_autostart.sh b/enable_autostart.sh index 49121f6..c9bae76 100755 --- a/enable_autostart.sh +++ b/enable_autostart.sh @@ -1,4 +1,4 @@ #!/bin/bash -sed -i 's/# restart: unless-stopped/ restart: unless-stopped/g' docker-compose.yml +sed -i 's/x-restart-policy: \&restart-policy "no"/x-restart-policy: \&restart-policy "unless-stopped"/g' docker-compose.yml docker-compose up -d From ea2826092468738d6dec07bdd9cf7f0b7cda8b4c Mon Sep 17 00:00:00 2001 From: ewancolyer <32178903+ewancolyer@users.noreply.github.com> Date: Sat, 9 Jul 2022 14:02:24 +0100 Subject: [PATCH 19/28] Updated FAQ link to website --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65312ae..7fad944 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,4 @@ For a list of all timezones see https://en.wikipedia.org/wiki/List_of_tz_databas # More information The LanCache docker-stack is generated automatically from the data over at [UKLans](https://github.com/uklans/cache-domains). All services that are listed in the UKLans repository are available and supported inside this docker-compose. -For an FAQ see https://github.com/lancachenet/monolithic/blob/master/faq.md +For an FAQ see [https://github.com/lancachenet/monolithic/blob/master/faq.md](https://lancache.net/docs/faq/) From d96e2133939981763babae8ccaf655fa224b0cf6 Mon Sep 17 00:00:00 2001 From: ewancolyer <32178903+ewancolyer@users.noreply.github.com> Date: Sat, 9 Jul 2022 14:04:17 +0100 Subject: [PATCH 20/28] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fad944..aaa36c9 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,4 @@ For a list of all timezones see https://en.wikipedia.org/wiki/List_of_tz_databas # More information The LanCache docker-stack is generated automatically from the data over at [UKLans](https://github.com/uklans/cache-domains). All services that are listed in the UKLans repository are available and supported inside this docker-compose. -For an FAQ see [https://github.com/lancachenet/monolithic/blob/master/faq.md](https://lancache.net/docs/faq/) +For an FAQ see https://lancache.net/docs/faq/ From 5250f44bdb24f826b70b57ded902c052b916a046 Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Thu, 16 Feb 2023 13:30:19 -0500 Subject: [PATCH 21/28] Changing CACHE_DISK_SIZE to use the 'g' suffix instead of 'm', as disk sizes are generally in the terabyte range now. --- .env | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 80b25f1..a3f3a3c 100644 --- a/.env +++ b/.env @@ -19,12 +19,12 @@ UPSTREAM_DNS=8.8.8.8 ## Note that by default, this will be a folder relative to the docker-compose.yml file CACHE_ROOT=./lancache -## Change this to customise the size of the disk cache (default 2000000m) +## Change this to customise the size of the disk cache (default 2000g) ## If you have more storage, you'll likely want to increase this ## The cache server will prune content on a least-recently-used basis if it ## starts approaching this limit. ## Set this to a little bit less than your actual available space -CACHE_DISK_SIZE=2000000m +CACHE_DISK_SIZE=2000g ## Change this to allow sufficient index memory for the nginx cache manager (default 500m) ## We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE diff --git a/README.md b/README.md index 9940fd9..e18c66c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This setting will constrain the upper limit of space used by cached data. You ge The cache server will automatically delete cached data when the total stored amount approaches this limit, in a least-recently-used fashion (oldest data, least accessed deleted first). -> **Note:** that this must be given in megabytes with an `m` suffix (e.g. the default value, `1000000m`). +> **Note:** that this must be given in gigabytes with a `g` suffix (e.g. the default value, `2000g`). ## `CACHE_INDEX_SIZE` Change this to allow sufficient index memory for the nginx cache manager (default 500m) From 4def81945e7b911a83c59a7254967fe7c0457ef8 Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Thu, 16 Feb 2023 15:20:40 -0500 Subject: [PATCH 22/28] Update README.md Co-authored-by: GotenXiao --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e18c66c..6604ab4 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,9 @@ This setting will constrain the upper limit of space used by cached data. You ge The cache server will automatically delete cached data when the total stored amount approaches this limit, in a least-recently-used fashion (oldest data, least accessed deleted first). -> **Note:** that this must be given in gigabytes with a `g` suffix (e.g. the default value, `2000g`). +> **Note:** that this must be given in either: +> - gigabytes, with `g` suffix (e.g. the default value, `1000g`) +> - megabytes, with `m` suffix (e.g. `900000m`) ## `CACHE_INDEX_SIZE` Change this to allow sufficient index memory for the nginx cache manager (default 500m) From a956dce912cd18d4bbefc3f63d12d573339258ec Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 9 Apr 2024 15:38:48 +0200 Subject: [PATCH 23/28] chore: update docker-compose.yml --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e0b39ab..c96eed0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '2' x-restart-policy: &restart-policy "no" services: dns: From 661be072316f75c1edbf93ae7164e9d27b9d824e Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Mon, 6 May 2024 16:11:55 -0400 Subject: [PATCH 24/28] Adding support for NGINX's min_free variable --- .env | 13 +++++++++---- README.md | 11 ++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.env b/.env index a3f3a3c..d2b13ab 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ ## See the "Settings" section in README.md for more details -## Set this to true if you're using a load balancer, or set it to false if you're using seperate IPs for each service. +## Set this to true if you're using a load balancer, or set it to false if you're using separate IPs for each service. ## If you're using monolithic (the default), leave this set to true USE_GENERIC_CACHE=true @@ -19,15 +19,20 @@ UPSTREAM_DNS=8.8.8.8 ## Note that by default, this will be a folder relative to the docker-compose.yml file CACHE_ROOT=./lancache -## Change this to customise the size of the disk cache (default 2000g) +## Change this to customize the size of the disk cache (default 2000g) ## If you have more storage, you'll likely want to increase this ## The cache server will prune content on a least-recently-used basis if it ## starts approaching this limit. -## Set this to a little bit less than your actual available space +## Set this to a little bit less than your actual available space CACHE_DISK_SIZE=2000g +## Sets the minimum free disk space that must be kept at all times. +## When the available free space drops below the set amount for any reason, the cache server will begin +## pruning content to free up space. +MIN_FREE_DISK=100g + ## Change this to allow sufficient index memory for the nginx cache manager (default 500m) -## We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE +## We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE CACHE_INDEX_SIZE=500m ## Change this to limit the maximum age of cached content (default 3650d) diff --git a/README.md b/README.md index 6604ab4..f3d87f5 100644 --- a/README.md +++ b/README.md @@ -59,11 +59,16 @@ The cache server will automatically delete cached data when the total stored amo > **Note:** that this must be given in either: > - gigabytes, with `g` suffix (e.g. the default value, `1000g`) -> - megabytes, with `m` suffix (e.g. `900000m`) +> - terabytes, with `t` suffix (e.g. `4t`) + +## `MIN_FREE_DISK` +Configures the minimum amount of free disk space that must be kept at all times. This setting avoids the scenario where the disk can accidentally become completely full, and no further data can be written. + +When the available free space drops below the set amount for any reason, the cache server will begin pruning content in a least-recently-used fashion, similar to how `CACHE_DISK_SIZE` works. ## `CACHE_INDEX_SIZE` Change this to allow sufficient index memory for the nginx cache manager (default 500m) -We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE +We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE > **Note:** this setting does not limit the amount of memory that the Linux host will use for page caches, only what the cache server will use itself - see the Docker documentation on limiting memory consumption for a container if you wish to constrain the total memory consumption of the cache server, but generally you want as much memory as possible on your cache server to be used to store hot data. @@ -73,7 +78,7 @@ This setting allows you to control the maximum duration cached data will be kept > **Note:** this must be given as a number of days in age before expiry, with a `d` suffix (e.g. the default value, `3650d`). ## `TZ` -This setting allows you to set the timezone that is used by the docker containers. Most notably changing the timestamps of the logs. Useful for debugging without having to think sometimes multiple hours in the future/past. +This setting allows you to set the timezone that is used by the docker containers. Most notably changing the timestamps of the logs. Useful for debugging without having to think sometimes multiple hours in the future/past. For a list of all timezones see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. From a1627fdbbad9c9e5e3dde90cf65632ff575220c3 Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Tue, 28 May 2024 21:58:33 -0400 Subject: [PATCH 25/28] Fixed spelling to use the British spelling of words. Added a cspell config that will prefer British spellings, so that future contributor's editors will use the preferred spelling. Cleaned up some redundancy in the docs --- .cspell.config.json | 19 +++++++++++++++++++ .env | 14 +++++++------- README.md | 5 ++--- 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .cspell.config.json diff --git a/.cspell.config.json b/.cspell.config.json new file mode 100644 index 0000000..9b6862e --- /dev/null +++ b/.cspell.config.json @@ -0,0 +1,19 @@ +// cSpell Settings +{ + "version": "0.2", + "language": "en-GB", + + "dictionaries": [ + // Makes cSpell only use the British spelling of words + "!en_US" + ], + // List of words to be always considered correct + "words": [ + ], + // List of words to be always considered incorrect + // This is useful for offensive words and common spelling errors. + // For example "hte" should be "the" + "flagWords": [ + "hte" + ] +} diff --git a/.env b/.env index d2b13ab..b77f4c6 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ USE_GENERIC_CACHE=true ## IP addresses that the lancache monolithic instance is reachable on -## Specify one or more IPs, space separated - these will be used when resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam) +## Specify one or more IPs, space separated - these will be used when colour resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam) ## Note: This setting only affects DNS, monolithic and sniproxy will still bind to all IPs by default LANCACHE_IP=10.0.39.1 @@ -19,17 +19,17 @@ UPSTREAM_DNS=8.8.8.8 ## Note that by default, this will be a folder relative to the docker-compose.yml file CACHE_ROOT=./lancache -## Change this to customize the size of the disk cache (default 2000g) -## If you have more storage, you'll likely want to increase this +## Change this to customise the maximum size of the disk cache (default 2000g). +## If you have more storage, you'll likely want to increase this. ## The cache server will prune content on a least-recently-used basis if it ## starts approaching this limit. -## Set this to a little bit less than your actual available space CACHE_DISK_SIZE=2000g ## Sets the minimum free disk space that must be kept at all times. -## When the available free space drops below the set amount for any reason, the cache server will begin -## pruning content to free up space. -MIN_FREE_DISK=100g +## When the available free space drops below the set amount for any reason, +## the cache server will begin pruning content to free up space. +## Prevents accidentally running out of disk space if CACHE_DISK_SIZE is set too high. +MIN_FREE_DISK=10g ## Change this to allow sufficient index memory for the nginx cache manager (default 500m) ## We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE diff --git a/README.md b/README.md index f3d87f5..e54f37b 100644 --- a/README.md +++ b/README.md @@ -53,12 +53,11 @@ The `CACHE_ROOT` should either be on a separate partition, or ideally on separat > **Note:** this setting defaults to `./lancache`. Unless your cache storage lives here, you probably want to change this value. ## `CACHE_DISK_SIZE` -This setting will constrain the upper limit of space used by cached data. You generally want to leave a small gap (10-20GB at least) between the size listed here and the available storage space used for the cached data, just in case. - +This setting will constrain the upper limit of space used by cached data. The cache server will automatically delete cached data when the total stored amount approaches this limit, in a least-recently-used fashion (oldest data, least accessed deleted first). > **Note:** that this must be given in either: -> - gigabytes, with `g` suffix (e.g. the default value, `1000g`) +> - gigabytes, with `g` suffix (e.g. the default value, `2000g`) > - terabytes, with `t` suffix (e.g. `4t`) ## `MIN_FREE_DISK` From 705695e0f83a83ab086bbbe4c9b3c07fd7469c84 Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Mon, 24 Jun 2024 17:36:42 -0400 Subject: [PATCH 26/28] Removing "colour" that was accidentially inserted where it shouldn't have been --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index b77f4c6..a84fbd1 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ USE_GENERIC_CACHE=true ## IP addresses that the lancache monolithic instance is reachable on -## Specify one or more IPs, space separated - these will be used when colour resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam) +## Specify one or more IPs, space separated - these will be used when resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam) ## Note: This setting only affects DNS, monolithic and sniproxy will still bind to all IPs by default LANCACHE_IP=10.0.39.1 From 12beb1f4afba7c0ba14f26b63b43ab2d41fd5dcb Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Sat, 22 Feb 2025 17:17:39 -0500 Subject: [PATCH 27/28] Delete .github/stale.yml --- .github/stale.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 9dbb27e..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,2 +0,0 @@ -#Inherit for lancachenet/.github -_extends: .github From 82791eae2e0d010a63c6734daf82337d1f75cd89 Mon Sep 17 00:00:00 2001 From: Barry Zubel <20169744+Lepidopterist@users.noreply.github.com> Date: Sun, 23 Feb 2025 10:33:12 +0000 Subject: [PATCH 28/28] Update update_containers.sh to use new docker compose variant docker-compose is retired, functionality is now docker compose. --- update_containers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update_containers.sh b/update_containers.sh index b54e667..d0cdc51 100644 --- a/update_containers.sh +++ b/update_containers.sh @@ -1,5 +1,5 @@ #!/bin/bash -docker-compose pull -docker-compose up -d --remove-orphans +docker compose pull +docker compose up -d --remove-orphans