Compare commits

..

5 Commits

Author SHA1 Message Date
MSWS
0cdc0f90ab fix: Add Restic unlock commands for reliable backups
Add unlock commands to Restic repositories in backup script

- Add command to unlock the default Restic repository before backup, improving reliability
- Add command to unlock the USB backup repository to ensure proper access
2025-03-25 13:09:00 -07:00
MSWS
86dbeb2c51 feat: Add URL rewrite and format config for routing and books
- Add `handle_path` block in `Caddyfile` to route `/s/*` requests to `chhoto-url:4567` via reverse proxy.
- Add `SUPPORTED_FORMATS` environment variable to `calibre-web-automated-book-downloader` in `compose.yml` to specify supported book formats (`epub`).
- Improve comments and documentation in `compose.yml` for clearer configuration details.

[caddy/Caddyfile]
- Added a new `handle_path` block to handle requests with the `/s/*` path.
  - Requests matching this path are rewritten by removing the `/s/` prefix.
  - These rewritten requests are then routed to `chhoto-url:4567` via reverse proxy.

- No changes were made to existing configurations. This change likely introduces a new route for handling shortened URLs or similar functionality.
[calibre/compose.yml]
- Added a new environment variable, `SUPPORTED_FORMATS`, to the configuration of `calibre-web-automated-book-downloader`, specifying supported book formats (`epub`).
- No changes were made to the ports, but some ports settings remain commented out for potential adjustments.
- Updated comments and documentation for variables and configuration, likely to improve clarity and explain configuration details more explicitly.
- No functional changes to other services or volume bindings.
2025-03-24 22:40:02 -07:00
MSWS
11e75f1203 Add Docker Compose configuration for Calibre services
Introduce Calibre Docker Compose Configuration

- Set up services for automated web and book downloading
- Configure environment variables and timezone settings
- Define volume mappings for storage and configuration
- Implement healthcheck for reliability of the downloader service
- Establish a communication network between services
2025-03-17 22:58:32 -07:00
MSWS
2bf10213f5 Allow subdomains for code service in Caddyfile
- Allow subdomains for the code service in the Caddyfile.
2025-03-17 10:32:27 -07:00
MSWS
9f06b7d7f5 Configure Caddy and Prometheus for internal service communication
- Configure Caddy admin settings for inter-service communication
- Set up reverse proxy for Prometheus in Caddyfile
- Implement new scrape configuration for Caddy in Prometheus settings
- Add scrape target for Caddy listening on port 2019
2025-03-16 21:14:13 -07:00
5 changed files with 70 additions and 1 deletions

View File

@@ -4,7 +4,9 @@ source /home/iboaz/.restic.sh
exec > >(logger -t backup) 2>&1
/usr/bin/restic unlock
/usr/bin/restic backup -o s3.storage-class=INTELLIGENT_TIERING --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose /
/usr/bin/restic -r /mnt/usb/backups/ unlock
/usr/bin/restic -r /mnt/usb/backups/ backup --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose /
/usr/bin/restic forget --keep-last 1 --keep-daily 3 --keep-weekly 4 --keep-monthly 3 --keep-yearly 3 --prune
/usr/bin/restic -r /mnt/usb/backups/ forget --keep-last 1 --keep-daily 7 --keep-weekly 8 --keep-monthly 3 --keep-yearly 3 --prune

View File

@@ -44,7 +44,7 @@ pass.local.msws.xyz, pass.msws.xyz {
reverse_proxy vaultwarden:80
}
code.local.msws.xyz, code.msws.xyz {
code.local.msws.xyz, code.msws.xyz, *.code.msws.xyz {
reverse_proxy code-server:8443
}
@@ -60,6 +60,10 @@ stats.local.msws.xyz {
reverse_proxy grafana:3000
}
prom.local.msws.xyz {
reverse_proxy prometheus:9090
}
photos.local.msws.xyz, photos.msws.xyz {
reverse_proxy immich_server:2283
}
@@ -73,6 +77,11 @@ photos.local.msws.xyz, photos.msws.xyz {
}
}
handle_path /s/* {
rewrite /s/ /
reverse_proxy chhoto-url:4567
}
reverse_proxy https://msws.github.io {
header_up Host msws.github.io
}

View File

@@ -17,6 +17,7 @@ services:
- caddy_config:/config
environment:
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
- CADDY_ADMIN=caddy-caddy-1:2019
networks:
- cloudflared

54
calibre/compose.yml Normal file
View File

@@ -0,0 +1,54 @@
services:
calibre-web-automated:
image: crocodilestick/calibre-web-automated:latest
container_name: calibre-web-automated
environment:
- PUID=1000
- PGID=1000
# Edit to match your current timezone https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- TZ=America/Los_Angeles
volumes:
# CW users migrating should stop their existing CW instance, make a copy of the config folder, and bind that here to carry over all of their user settings ect.
- $PWD/config:/config
# This is an ingest dir, NOT a library one. Anything added here will be automatically added to your library according to the settings you have configured in CWA Settings page. All files placed here are REMOVED AFTER PROCESSING
- calibre-downloads:/cwa-book-ingest
# If you don't have an existing library, CWA will automatically create one at the bind provided here
- $PWD/library:/calibre-library
- /app/calibre-web/gmail.json
# ports:
# Change the first number to change the port you want to access the Web UI, not the second
# - 8083:8083
restart: unless-stopped
networks:
- cloudflared
calibre-web-automated-book-downloader:
image: ghcr.io/calibrain/calibre-web-automated-book-downloader:latest
environment:
FLASK_PORT: 8084
FLASK_DEBUG: false
BOOK_LANGUAGE: en
SUPPORTED_FORMATS: epub
#ports:
# - 8084:8084
# Uncomment the following lines if you want to enable healthcheck
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8084/request/api/status"]
interval: 30s
timeout: 30s
retries: 3
start_period: 5s
restart: unless-stopped
volumes:
# This is where the books will be downloaded to, usually it would be
# the same as whatever you gave in "calibre-web-automated"
- calibre-downloads:/cwa-book-ingest
networks:
- cloudflared
volumes:
calibre-downloads:
networks:
cloudflared:
external: true

View File

@@ -37,3 +37,6 @@ scrape_configs:
bearer_token: 'ZmNmZjkxZDktODU0YS00NDRiLWE2N2YtZTRkZjY5ZGZiZDI4Cg=='
static_configs:
- targets: [ 'wakapi:3002' ]
- job_name: caddy
static_configs:
- targets: [ 'caddy-caddy-1:2019' ]