Skip to content

Instantly share code, notes, and snippets.

@KEINOS
Last active March 15, 2024 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KEINOS/4b32dba059b3cbd5315c6b21ee8d60dd to your computer and use it in GitHub Desktop.
Save KEINOS/4b32dba059b3cbd5315c6b21ee8d60dd to your computer and use it in GitHub Desktop.
docker-compose.yml files for home lab
version: '3'
services:
dns:
image: lancachenet/lancache-dns:latest
env_file: ./env_file
restart: unless-stopped
ports:
- 53:53/udp
- 53:53/tcp
monolithic:
image: lancachenet/monolithic:latest
env_file: ./env_file
restart: unless-stopped
ports:
- 80:80/tcp
- 443:443/tcp
volumes:
- ./data/cache:/data/cache
- ./data/logs:/data/logs
## 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.
## If you're using monolithic (the default), leave this set to true
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)
## Note: This setting only affects DNS, monolithic and sniproxy will still bind to all IPs by default
LANCACHE_IP=<host ip>
## IP address on the host that the DNS server should bind to
DNS_BIND_IP=<host ip>
## DNS Resolution for forwarded DNS lookups
UPSTREAM_DNS=1.1.1.1; 8.8.8.8; 8.8.4.4; <your gateway>
## Storage path for the cached data
## Note that by default, this will be a folder relative to the docker-compose.yml file
CACHE_ROOT=./data
## 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=1000g
## 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=250m
## Change this to limit the maximum age of cached content (default 3650d)
#CACHE_MAX_AGE=3650d
CACHE_MAX_AGE=6d
## 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=Asia/Tokyo
## Domain lists to cache (custom domain list for lancachenet-dns.
CACHE_DOMAINS_REPO="https://github.com/KEINOS/cache-domains.git"
CACHE_DOMAINS_BRANCH="main"
# docker-compose.yml of Portainer.
# See: https://www.portainer.io/
version: "3"
services:
portainer:
image: portainer/portainer-ce:latest
ports:
- 9443:9443
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
# docker-compose.yml of LibreSpeed speed test
# See: https://github.com/librespeed/speedtest-go
version: "3"
services:
speedtest:
container_name: speedtest
build:
context: https://github.com/librespeed/speedtest-go.git
image: speedtest
ports:
- "8989:8989"
restart: unless-stopped
volumes:
# This example mounts the settings.toml file from the current directory as
# a volume. If the toml file is placed in a different directory, you will
# need to specify the full/absolute path to the file.
# For TOML file see: https://github.com/librespeed/speedtest-go/blob/master/settings.toml
- ${PWD}/settings.toml:/app/settings.toml
# For custom themes:
# 1. Uncomment the following 2 lines to mount "assets" directory under "/app"
# directory in the container. For more information, see the assets section
# of "Compile from source" in the README.md file. Also note that the
# path to the "assets" in local machine must be absolute.
#- ${PWD}/web/assets:/app/assets
#- ${PWD}/web/assets/example-singleServer-pretty.html:/app/assets/index.html
# 2. Edit the "assets_path" section in the settings.toml file to point the
# assets directory to "/app/assets".
# e.g.) assets_path = "./assets"
# docker-compose.yml of Syncthing
version: "3"
services:
syncthing:
image: syncthing/syncthing
container_name: syncthing
hostname: my-syncthing
environment:
- PUID=1000
- PGID=1000
volumes:
- ./config:/home/syncthing/.config/syncthing
- ./data:/var/syncthing
ports:
- 8384:8384 # Web UI
- 22000:22000/tcp # TCP file transfers
- 22000:22000/udp # QUIC file transfers
- 21027:21027/udp # Receive local discovery broadcasts
restart: unless-stopped
# docker-compose.yml of Tesseract OCR web interface
# See: https://github.com/santhoshtr/tesseract-web
version: "3"
services:
tesseract_web:
container_name: tesseract_web
build:
context: https://github.com/santhoshtr/tesseract-web.git
image: tesseract_web
ports:
- "5000:80"
restart: unless-stopped
# docker-compose.yml of Uptaime Kuma
# See: https://uptime.kuma.pet/
version: "3"
services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
volumes:
- ./data:/app/data
ports:
- "3001:3001" # <Host Port>:<Container Port>
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment