chore: adjust docker files

This commit is contained in:
2025-06-29 13:05:09 +03:00
parent 6dccf35a30
commit da4bffad4d
4 changed files with 51 additions and 37 deletions

View File

@ -6,23 +6,27 @@ services:
container_name: sb-ruleset-sync
restart: unless-stopped
# Mount volumes:
# - The local `rules` directory is mounted into the container, so downloaded
# files persist between container restarts.
# - The `template.json` is mounted as read-only for security.
volumes:
- ./template.json:/config/template.json:ro
# Mount the directory with original `template.json` file.
- ./config:/config
# Mount the directory for the downloaded rule files.
- ./rules:/rules
environment:
# Timezone for logs and cron.
- TZ=Europe/Moscow
# Optional: Set the user and group ID for the 'app' user inside the container.
# Match this to your host user (`id -u` and `id -g`) to avoid file permission
# issues on the mounted `./rules` volume.
# Cron schedule. Default is 2:10 AM daily.
- CRON_SCHEDULE="10 2 * * *"
# User/Group IDs to avoid permission issues on volumes.
- PUID=1000
- PGID=1000
# A healthcheck to ensure the cron daemon is running.
# --- URL REWRITING (REQUIRED) ---
# The domain of your server that will host the rules.
- DOMAIN=my.server.com
# The path on your server where the rules are accessible.
- RULE_PATH=rules
healthcheck:
test: ["CMD", "pgrep", "crond"]
interval: 1m