Skip to content

Commit a85fdfb

Browse files
committed
Initial commit
0 parents  commit a85fdfb

26 files changed

+839
-0
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env zsh
2+
3+
export PATH=$(pwd)/scripts:$PATH

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.ssh
2+
*.env
3+

.old/docker-compose-old.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
volumes:
2+
prometheus-data:
3+
grafana-data:
4+
portainer-data:
5+
influxdb-data:
6+
7+
services:
8+
9+
ubuntu-cli:
10+
container_name: ubuntu-cli
11+
image: ubuntu-cli
12+
command: ["-c", "sleep infinity"]
13+
14+
influxdb:
15+
container_name: influxdb
16+
hostname: influxdb
17+
image: influxdb:2.6
18+
restart: unless-stopped
19+
command:
20+
- "--session-length=52560"
21+
volumes:
22+
- 'influxdb-data:/var/lib/influxdb2'
23+
ports:
24+
- 8086:8086
25+
26+
portainer:
27+
container_name: portainer
28+
hostname: portainer
29+
image: portainer/portainer-ce:latest
30+
restart: unless-stopped
31+
volumes:
32+
- 'portainer-data:/data'
33+
- '/var/run/docker.sock:/var/run/docker.sock'
34+
ports:
35+
- 8000:8000
36+
- 9443:9443
37+
38+
prometheus:
39+
container_name: prometheus
40+
hostname: prometheus
41+
image: prom/prometheus
42+
restart: unless-stopped
43+
volumes:
44+
- '/volume1/docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
45+
- '/volume1/docker/prometheus/alert-rules.yml:/etc/prometheus/alert-rules.yml'
46+
- 'prometheus-data:/prometheus'
47+
command:
48+
- '--config.file=/etc/prometheus/prometheus.yml'
49+
- "--storage.tsdb.retention.time=30d"
50+
- "--storage.tsdb.path=/prometheus/"
51+
ports:
52+
- 9090:9090
53+
extra_hosts:
54+
- "host.docker.internal:host-gateway" # enables host.docker.internal as a dns name
55+
56+
grafana:
57+
container_name: grafana
58+
hostname: grafana
59+
image: grafana/grafana-oss
60+
restart: unless-stopped
61+
volumes:
62+
- 'grafana-data:/var/lib/grafana'
63+
ports:
64+
- 3000:3000
65+
66+
ngrok:
67+
container_name: ngrok
68+
image: ngrok/ngrok:latest
69+
restart: unless-stopped
70+
command:
71+
- "start"
72+
- "--all"
73+
- "--config"
74+
- "/etc/ngrok.yaml"
75+
volumes:
76+
- '/volume1/docker/ngrok/config.yaml:/etc/ngrok.yaml'
77+
ports:
78+
- 4041:4040
79+
80+
node-exporter:
81+
image: prom/node-exporter:latest
82+
container_name: node-exporter
83+
restart: unless-stopped
84+
volumes:
85+
- /proc:/host/proc:ro
86+
- /sys:/host/sys:ro
87+
- /:/rootfs:ro
88+
command:
89+
- '--path.procfs=/host/proc'
90+
- '--path.rootfs=/rootfs'
91+
- '--path.sysfs=/host/sys'
92+
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
93+
expose:
94+
- 9100
95+
96+
pihole-exporter:
97+
image: pihole-exporter:latest
98+
hostname: pihole-exporter
99+
container_name: pihole-exporter
100+
restart: unless-stopped
101+
environment:
102+
PIHOLE_HOSTNAME: pihole
103+
PIHOLE_PORT: 8080
104+
PIHOLE_PASSWORD: ${PIHOLE_WEBPASSWORD}
105+
PORT: 9617
106+
ports:
107+
- 9617:9617
108+
109+
pihole:
110+
container_name: pihole
111+
hostname: pihole
112+
image: pihole/pihole:latest
113+
restart: unless-stopped
114+
environment:
115+
TZ: 'America/Chicago'
116+
FTLCONF_LOCAL_IPV4: 192.168.0.150
117+
ServerIP: 192.168.0.150
118+
WEB_PORT: 8080
119+
QUERY_LOGGING: "false"
120+
volumes:
121+
- '/volume1/docker/pihole/pihole:/etc/pihole'
122+
- '/volume1/docker/pihole/dnsmasq.d:/etc/dnsmasq.d'
123+
ports:
124+
- "53:53/tcp"
125+
- "53:53/udp"
126+
- "8080:8080"
127+

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nas:
2+
nas dc up -d

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Containers
2+
3+
This repo contains configuration for the containers I use on my home network.
4+
5+
The `docker-compose-nas.yml` is the docker compose for my synology.
6+
7+

Taskfile.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://taskfile.dev
2+
3+
version: '3'
4+
5+
vars:
6+
GREETING: Hello, World!
7+
8+
tasks:
9+
default:
10+
cmds:
11+
- docker exec -it --detach-keys "ctrl-z,z" ubuntu-cli zsh
12+
stop:
13+
cmds:
14+
- docker-compose stop
15+
start:
16+
cmds:
17+
- docker-compose start
18+
19+
nasubuntu:
20+
cmds:
21+
- nas docker exec -it --detach-keys "ctrl-z,z" ubuntu-cli zsh
22+
nas:
23+
cmds:
24+
- nas dc up -d
25+
silent: false

caddy-nas/Caddyfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:2024 {
2+
respond "Hello, world!!"
3+
}
4+
5+
:2025 {
6+
file_server * browse
7+
}

caddy-nas/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM caddy:2.7.6
2+
COPY ./Caddyfile /etc/caddy/Caddyfile
3+
COPY html /srv
4+

caddy-nas/html/caddy.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello from Caddy!!

dc-archivebox.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
volumes:
2+
archivebox-data:
3+
# Usage:
4+
# docker compose run archivebox init --setup
5+
# docker compose up
6+
# echo "https://example.com" | docker compose run archivebox archivebox add
7+
# docker compose run archivebox add --depth=1 https://example.com/some/feed.rss
8+
# docker compose run archivebox config --set MEDIA_MAX_SIZE=750m
9+
# docker compose run archivebox help
10+
# Documentation:
11+
# https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose
12+
13+
version: '3.9'
14+
15+
services:
16+
archivebox:
17+
#image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
18+
container_name: archivebox
19+
image: archivebox/archivebox:dev
20+
command: server --quick-init 0.0.0.0:8000
21+
ports:
22+
- 8250:8000
23+
volumes:
24+
- archivebox-data:/data
25+
# - ./etc/crontabs:/var/spool/cron/crontabs # uncomment this and archivebox_scheduler below to set up automatic recurring archive jobs
26+
# - ./archivebox:/app/archivebox # uncomment this to mount the ArchiveBox source code at runtime (for developers working on archivebox)
27+
# build: . # uncomment this to build the image from source code at buildtime (for developers working on archivebox)
28+
environment:
29+
- ALLOWED_HOSTS=* # restrict this to only accept incoming traffic via specific domain name
30+
# - PUBLIC_INDEX=True # set to False to prevent anonymous users from viewing snapshot list
31+
# - PUBLIC_SNAPSHOTS=True # set to False to prevent anonymous users from viewing snapshot content
32+
# - PUBLIC_ADD_VIEW=False # set to True to allow anonymous users to submit new URLs to archive
33+
# - ADMIN_USERNAME=admin # create an admin user on first run with the given user/pass combo
34+
# - ADMIN_PASSWORD=SomeSecretPassword
35+
# - PUID=911 # set to your host user's UID & GID if you encounter permissions issues
36+
# - PGID=911
37+
# - SEARCH_BACKEND_ENGINE=sonic # uncomment these and sonic container below for better full-text search
38+
# - SEARCH_BACKEND_HOST_NAME=sonic
39+
# - SEARCH_BACKEND_PASSWORD=SomeSecretPassword
40+
# - MEDIA_MAX_SIZE=750m # increase this filesize limit to allow archiving larger audio/video files
41+
# - TIMEOUT=60 # increase this number to 120+ seconds if you see many slow downloads timing out
42+
# - CHECK_SSL_VALIDITY=True # set to False to disable strict SSL checking (allows saving URLs w/ broken certs)
43+
# - SAVE_ARCHIVE_DOT_ORG=True # set to False to disable submitting all URLs to Archive.org when archiving
44+
# ...
45+
# add further configuration options from archivebox/config.py as needed (to apply them only to this container)
46+
# or set using `docker compose run archivebox config --set SOME_KEY=someval` (to persist config across all containers)
47+
48+
# For ad-blocking during archiving, uncomment this section and pihole service section below
49+
# networks:
50+
# - dns
51+
# dns:
52+
# - 172.20.0.53
53+
54+
55+
######## Optional Addons: tweak examples below as needed for your specific use case ########
56+
57+
### Example: To run the Sonic full-text search backend, first download the config file to sonic.cfg
58+
# $ curl -O https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/etc/sonic.cfg
59+
# After starting, backfill any existing Snapshots into the full-text index:
60+
# $ docker-compose run archivebox update --index-only
61+
62+
# sonic:
63+
# image: valeriansaliou/sonic:latest
64+
# expose:
65+
# - 1491
66+
# environment:
67+
# - SEARCH_BACKEND_PASSWORD=SomeSecretPassword
68+
# volumes:
69+
# - ./sonic.cfg:/etc/sonic.cfg:ro
70+
# - ./data/sonic:/var/lib/sonic/store
71+
72+
73+
### Example: To run pihole in order to block ad/tracker requests during archiving,
74+
# uncomment this block and set up pihole using its admin interface
75+
76+
# pihole:
77+
# image: pihole/pihole:latest
78+
# ports:
79+
# - 127.0.0.1:8090:80 # uncomment to access the admin HTTP interface on http://localhost:8090
80+
# environment:
81+
# - WEBPASSWORD=SET_THIS_TO_SOME_SECRET_PASSWORD_FOR_ADMIN_DASHBOARD
82+
# - DNSMASQ_LISTENING=all
83+
# dns:
84+
# - 127.0.0.1
85+
# - 1.1.1.1
86+
# networks:
87+
# dns:
88+
# ipv4_address: 172.20.0.53
89+
# volumes:
90+
# - ./etc/pihole:/etc/pihole
91+
# - ./etc/dnsmasq:/etc/dnsmasq.d
92+
93+
94+
### Example: Enable ability to run regularly scheduled archiving tasks by uncommenting this container
95+
# $ docker compose run archivebox schedule --every=day --depth=1 'https://example.com/some/rss/feed.xml'
96+
# then restart the scheduler container to apply the changes to the schedule
97+
# $ docker compose restart archivebox_scheduler
98+
99+
# archivebox_scheduler:
100+
# image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
101+
# command: schedule --foreground
102+
# environment:
103+
# - MEDIA_MAX_SIZE=750m # increase this number to allow archiving larger audio/video files
104+
# # - TIMEOUT=60 # increase if you see timeouts often during archiving / on slow networks
105+
# # - ONLY_NEW=True # set to False to retry previously failed URLs when re-adding instead of skipping them
106+
# # - CHECK_SSL_VALIDITY=True # set to False to allow saving URLs w/ broken SSL certs
107+
# # - SAVE_ARCHIVE_DOT_ORG=True # set to False to disable submitting URLs to Archive.org when archiving
108+
# # - PUID=502 # set to your host user's UID & GID if you encounter permissions issues
109+
# # - PGID=20
110+
# volumes:
111+
# - ./data:/data
112+
# - ./etc/crontabs:/var/spool/cron/crontabs
113+
# # cpus: 2 # uncomment / edit these values to limit container resource consumption
114+
# # mem_limit: 2048m
115+
# # shm_size: 1024m
116+
117+
118+
### Example: Put Nginx in front of the ArchiveBox server for SSL termination
119+
120+
# nginx:
121+
# image: nginx:alpine
122+
# ports:
123+
# - 443:443
124+
# - 80:80
125+
# volumes:
126+
# - ./etc/nginx.conf:/etc/nginx/nginx.conf
127+
# - ./data:/var/www
128+
129+
130+
### Example: run all your ArchiveBox traffic through a WireGuard VPN tunnel
131+
132+
# wireguard:
133+
# image: linuxserver/wireguard:latest
134+
# network_mode: 'service:archivebox'
135+
# cap_add:
136+
# - NET_ADMIN
137+
# - SYS_MODULE
138+
# sysctls:
139+
# - net.ipv4.conf.all.rp_filter=2
140+
# - net.ipv4.conf.all.src_valid_mark=1
141+
# volumes:
142+
# - /lib/modules:/lib/modules
143+
# - ./wireguard.conf:/config/wg0.conf:ro
144+
145+
146+
### Example: Run PYWB in parallel and auto-import WARCs from ArchiveBox
147+
148+
# pywb:
149+
# image: webrecorder/pywb:latest
150+
# entrypoint: /bin/sh -c '(wb-manager init default || test $$? -eq 2) && wb-manager add default /archivebox/archive/*/warc/*.warc.gz; wayback;'
151+
# environment:
152+
# - INIT_COLLECTION=archivebox
153+
# ports:
154+
# - 8080:8080
155+
# volumes:
156+
# - ./data:/archivebox
157+
# - ./data/wayback:/webarchive
158+
159+
160+
networks:
161+
162+
# network needed for pihole container to offer :53 dns resolving on fixed ip for archivebox container
163+
dns:
164+
ipam:
165+
driver: default
166+
config:
167+
- subnet: 172.20.0.0/24
168+

0 commit comments

Comments
 (0)