-
Notifications
You must be signed in to change notification settings - Fork 61
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
dantebarba
wants to merge
87
commits into
bcardiff:master
Choose a base branch
from
dantebarba:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dantebarba
commented
Apr 27, 2019
- "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.
bcardiff
reviewed
Apr 30, 2019
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 |
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)
Thanks @dantebarba I have added your /fail code with a couple tweaks. |
* 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`)
Simplifies `apk add`
When there are no logs to delete using the LOG_ROTATE variable will cause the container to crash. Thanks @Skaronator
- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.