Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "COMMAND" and "FAIL_URL" #7

Open
wants to merge 87 commits into
base: master
Choose a base branch
from

Conversation

dantebarba
Copy link

  • "COMMAND": variable was added to parametrize rclone execution. Now is possible to use not only sync command, but move, copy, or delete.
  • "FAIL_URL": Allows the user to set an URL for failure notification. With the standard "CHECK_URL", the script won't notify to the user when the command ends badly. The user would only be alerted when the service is down for a specific interval of time. Now the user is able to receive notifications when the rclone command did not end successfully. The default FAIL_URL is the "CHECK_URL" with an appended path "/fail", as defined by healthchecks.io. This url can be overridden by the user setting the "FAIL_URL" env var.

- Added "$COMMAND" variable to specify the desired command to execute
- Added "$FAIL_URL" variable to specify the failure default URL in case of command failure.
README.md Outdated Show resolved Hide resolved
@bcardiff
Copy link
Owner

There is a message "WARNING: A previous sync is still running. Skipping new sync command." that might need to be updated also if the command is not sync probably

@dantebarba
Copy link
Author

@bcardiff I think @pfidr34's version is better than this one, I would suggest to merge his pull request adding the "/fail" part from this pull request.

bcardiff and others added 5 commits May 1, 2019 14:09
typo

Co-Authored-By: dantebarba <dantebarba@gmail.com>
* 'master' of https://github.com/bcardiff/docker-rclone:
  Fix shellcheck failure
  Upgrade base alpine image and allow image to be parametrized
  Smoke test that rclone binary is available
  Clean up test docker images
  Fix #3. Avoid recursion when checking for empty source
  Fix deprecation warning due to MAINTAINER
  Add specs. Fix custom versions builds.
  Make ARCH and RCLONE_VERSION build-time arguments (#5)
@pfidr34
Copy link

pfidr34 commented May 1, 2019

@bcardiff I think @pfidr34's version is better than this one, I would suggest to merge his pull request adding the "/fail" part from this pull request.

Thanks @dantebarba I have added your /fail code with a couple tweaks.

tlex and others added 4 commits July 17, 2019 07:41
* removes the option `-U` (`Maximum AGE (in minutes) for index in cache before refresh` set to 1)
* removes the deletion of the local cache
* adds the option `--no-cache` (`Do not use any local cache path`)
When there are no logs to delete using the LOG_ROTATE variable will cause the container to crash.

Thanks @Skaronator
pfidr34 and others added 30 commits June 9, 2020 18:10
- This fixes the problem that the reported healtcheck is ok despite rclone exiting with an error, i.e. with return code unequal from 0.
- Moreover, it prints the return code for easy inspection of logs.
Critical: Fix healtcheck reporting ok but rclone failed in case DIR_CHECK, no OUTPUT_LOG.
Update my docker-rclone fork with pfidr34 fork because bcardiff is outdated and not maintained.
+ Success codes are configured by the "SUCCESS_CODES" env var
+ By default the value is "0"
+ Other codes can be specified
List of exit codes
0 - success
1 - Syntax or usage error
2 - Error not otherwise categorised
3 - Directory not found
4 - File not found
5 - Temporary error (one that more retries might fix) (Retry errors)
6 - Less serious errors (like 461 errors from dropbox) (NoRetry errors)
7 - Fatal error (one that more retries won't fix, like account suspended) (Fatal errors)
8 - Transfer exceeded - limit set by --max-transfer reached
9 - Operation successful, but no files transferred
Added new SUCCESS_CODES configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants