systemd/vlog-transcription.service.template
Rama dev · réplica de lectura del repositorio original.
# VLog Transcription Worker Service Template
# Copy to /etc/systemd/system/vlog-transcription.service and customize:
# - Replace <YOUR_USER> with your username
# - Replace /path/to/vlog with your installation path
# - Adjust storage path if not using /mnt/nas/vlog-storage
# - Adjust MemoryMax based on whisper model size (8G for medium model)
[Unit]
Description=VLog Transcription Worker
After=network.target postgresql.service mnt-nas.mount
Wants=mnt-nas.mount postgresql.service
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
Type=simple
User=<YOUR_USER>
Group=<YOUR_USER>
WorkingDirectory=/path/to/vlog
EnvironmentFile=/path/to/vlog/.env
Environment=PYTHONUNBUFFERED=1
ExecStart=/path/to/vlog/venv/bin/python worker/transcription.py
# Security hardening
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
NoNewPrivileges=true
CapabilityBoundingSet=
AmbientCapabilities=
# Allowed paths (NAS storage and working directory)
ReadWritePaths=/path/to/vlog /mnt/nas/vlog-storage
# Resource limits (higher for whisper model)
LimitNOFILE=65535
MemoryMax=8G
# Restart policy (longer delay for transcription)
Restart=on-failure
RestartSec=30
# Timeouts (longer for transcription jobs)
TimeoutStartSec=60
TimeoutStopSec=120
[Install]
WantedBy=multi-user.target