Skip to content

Instantly share code, notes, and snippets.

@catleeball
Last active May 9, 2023 19:13
Show Gist options
  • Save catleeball/18ec43d9e4409ddf9de1b7bdf0ed0181 to your computer and use it in GitHub Desktop.
Save catleeball/18ec43d9e4409ddf9de1b7bdf0ed0181 to your computer and use it in GitHub Desktop.
version: "3"
networks:
app_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1
services:
# Caching DNS server
# Docs: https://github.com/cytopia/docker-bind
#
# Some of this setup is stolen from here:
# https://github.com/cytopia/devilbox/blob/master/docker-compose.yml
bind:
image: cytopia/bind:latest
hostname: bind
container_name: bind
restart: always
ports:
- 8053:53/tcp
- 8053:53/udp
labels:
com.centurylinklabs.watchtower.enable: "true"
environment:
- COMPOSER_MEMORY_LIMIT=-1
- DNS_FORWARDER=8.8.8.8,8.8.4.4
# Times below in seconds.
# Docs here describe ranges of values for these
# https://www.zytrax.com/books/dns/ch8/soa.html
- TTL_TIME=86400
- REFRESH_TIME=43200
- RETRY_TIME=180
- EXPIRY_TIME=2419200
- MAX_CACHE_TIME=21000
dns:
- 127.0.0.1
extra_hosts:
docker.for.lin.host.internal: 172.16.238.1
docker.for.lin.localhost: 172.16.238.1
host.docker.internal: host-gateway
networks:
app_net:
ipv4_address: 172.16.238.100
watchtower:
# Updates containers automatically for us
# Docs: https://pkg.go.dev/github.com/CenturyLinkLabs/watchtower#section-readme
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
# Update interval in seconds, 1h
command: --cleanup --label-enable --interval 3600
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
com.centurylinklabs.watchtower.enable: "true"
# Use our bind container for DNS instead of localhost's resolver
dns:
- 172.16.238.100
networks:
app_net:
ipv4_address: 172.16.238.10
links:
- bind
at_warrior:
# Service to help archive stuff into archive.org
#
# Once this is running, you can access the web UI at:
# - http://localhost:8010
#
# Docs:
# - https://github.com/ArchiveTeam/warrior-dockerfile
# - https://wiki.archiveteam.org/index.php?title=ArchiveTeam_Warrior
container_name: at_warrior
image: atdr.meo.ws/archiveteam/warrior-dockerfile
ports:
- 8010:8001
environment:
# Tell composer not to restrain memory usage
- COMPOSER_MEMORY_LIMIT=-1
# Optional self-identification for leaderboards
# - DOWNLOADER=catball
# Optional basic HTTP auth to login to the web UI
# - HTTP_USERNAME=cat
# - HTTP_PASSWORD=YourCoolUniquePassword0
# Use any project by default, unless you tell it otherwise via the UI
- SELECTED_PROJECT=auto
- CONCURRENT_ITEMS=6
# - SHARED_RSYNC_THREADS=40
# volumes:
# Customize the paths before the colon to somewhere on your disk
# You can exclude this, but the container will forget what it was doing when it restarts without it
# - /home/cat/Services/ArchiveTeamWarrior/data:/data/data
labels:
com.centurylinklabs.watchtower.enable: "true"
restart: unless-stopped
links:
- bind
networks:
app_net:
ipv4_address: 172.16.238.20
dns:
# Use our bind container for DNS instead of localhost's DNS resolver.
#
# This is nice in case the host running the containers is doing DNS
# filtering that would impede archival. It also caches DNS requests,
# which Alpine OS doesn't do on its own if you just set this to an
# external resolver. With caching, you'll reduce the amount of requests
# you're sending to your upstream DNS server, and speed up resolution
# for cached requests.
- 172.16.238.100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment