Add Podman deployment support for HMAC File Server 3.2

- Introduced Dockerfile.podman for building a Podman-compatible image.
- Created deploy-podman.sh script for automated deployment and management.
- Added Podman-specific README.md with quick start and configuration details.
- Included example configuration file (config.toml.example) for production settings.
- Implemented systemd service file for managing the HMAC File Server as a service.
- Established health checks and security features in the container setup.
- Documented deployment commands and troubleshooting steps in README.md.
This commit is contained in:
2025-07-19 20:08:09 +00:00
parent 860761f72c
commit 9751fb9e93
9 changed files with 1806 additions and 4 deletions

View File

@ -0,0 +1,102 @@
# HMAC File Server - Podman Production Configuration
# This file is auto-generated by deploy-podman.sh
# Edit as needed for your specific deployment requirements
[server]
listen_address = "8888"
storage_path = "/data"
metrics_enabled = true
metrics_port = "9090"
max_upload_size = "10GB"
max_header_bytes = 1048576
cleanup_interval = "24h"
max_file_age = "720h"
enable_dynamic_workers = true
worker_scale_up_thresh = 40
worker_scale_down_thresh = 10
deduplication_enabled = true
min_free_bytes = "1GB"
file_naming = "original"
# Network resilience settings
graceful_shutdown_timeout = "300s"
connection_drain_timeout = "120s"
max_idle_conns_per_host = 5
idle_conn_timeout = "90s"
disable_keep_alives = false
client_timeout = "300s"
restart_grace_period = "60s"
[uploads]
# XMPP-compatible file extensions for maximum client support
allowed_extensions = [".zip", ".rar", ".7z", ".tar.gz", ".tgz", ".gpg", ".enc", ".pgp", ".txt", ".pdf", ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".svg", ".webp", ".wav", ".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".webm", ".mpeg", ".mpg", ".m4v", ".3gp", ".3g2", ".mp3", ".ogg", ".doc", ".docx"]
chunked_uploads_enabled = true
chunk_size = "32MB"
resumable_uploads_enabled = true
max_resumable_age = "48h"
sessiontimeout = "60m"
maxretries = 3
# Upload resilience settings
session_persistence = true
session_recovery_timeout = "300s"
client_reconnect_window = "120s"
upload_slot_ttl = "3600s"
retry_failed_uploads = true
max_upload_retries = 3
[downloads]
resumable_downloads_enabled = true
chunked_downloads_enabled = true
chunk_size = "32MB"
# Same extensions as uploads for consistency
allowed_extensions = [".zip", ".rar", ".7z", ".tar.gz", ".tgz", ".gpg", ".enc", ".pgp", ".txt", ".pdf", ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".svg", ".webp", ".wav", ".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".webm", ".mpeg", ".mpg", ".m4v", ".3gp", ".3g2", ".mp3", ".ogg", ".doc", ".docx"]
[security]
# IMPORTANT: Change these secrets in production!
secret = "CHANGE-THIS-PRODUCTION-SECRET-HMAC-KEY"
enablejwt = true
jwtsecret = "CHANGE-THIS-JWT-SECRET-KEY"
jwtalgorithm = "HS256"
jwtexpiration = "24h"
[logging]
level = "info"
file = "/logs/hmac-file-server.log"
max_size = 100
max_backups = 7
max_age = 30
compress = true
[deduplication]
enabled = true
directory = "/deduplication"
[workers]
numworkers = 4
uploadqueuesize = 100
[timeouts]
readtimeout = "3600s"
writetimeout = "3600s"
idletimeout = "3600s"
shutdown = "30s"
[versioning]
enableversioning = false
backend = "simple"
maxversions = 1
[redis]
redisenabled = false
redisdbindex = 0
redisaddr = "localhost:6379"
redispassword = ""
redishealthcheckinterval = "120s"
[clamav]
clamavenabled = false
clamavsocket = "/var/run/clamav/clamd.ctl"
numscanworkers = 2
scanfileextensions = [".exe", ".dll", ".bin", ".com", ".bat", ".sh", ".php", ".js"]
maxscansize = "200MB"