A Docker-based solution to automatically delete files that are no longer needed. This project monitors a directory for changes and, if unchanged for a set period of time, deletes a set of specified folders.
/Check directory for changes./Delete directory.You can configure the behavior of the Dead Switch using environment variables in the docker-compose.yml file:
FOLDER_TO_CHECK: The directory to monitor for changes (default: /Check)TIME_PERIOD: The time period (in seconds) to wait before considering the monitored folder as inactive (default: 86400 seconds, or 24 hours)DELETE_FOLDER: The base directory containing folders to be deleted (default: /Delete)DRY_RUN: If set to "true", the script will only simulate deletion without actually removing files (default: true)Clone this repository to your local machine.
Modify the docker-compose.yml file to set your desired configuration and volume mappings.
Build and start the Docker container:
docker-compose up -d
The Dead Switch will now run automatically according to the specified configuration.
Be very careful when using this tool, as it can permanently delete files. Always test thoroughly with DRY_RUN=true before enabling actual deletion.
[Specify your license here]
Content type
Image
Digest
sha256:c8c3e2c39…
Size
78 MB
Last updated
1 day ago
docker pull aevrin/deadswitch