diff options
| author | Kasra Bigdeli <[email protected]> | 2021-12-23 23:55:47 -0800 |
|---|---|---|
| committer | Kasra Bigdeli <[email protected]> | 2021-12-23 23:55:47 -0800 |
| commit | 0a80f8e9e756d04896d531a39506f1523462a6fa (patch) | |
| tree | 5241f71b8a7b5cca33a53377a5cfcf1c803dd6eb /public/v4/apps/rsync-looped.yml | |
| parent | e83c1c357963c238f408d4d3b6a4388e578a9fed (diff) | |
| download | caprover-one-click-apps-0a80f8e9e756d04896d531a39506f1523462a6fa.tar.gz caprover-one-click-apps-0a80f8e9e756d04896d531a39506f1523462a6fa.zip | |
Adding RSync
Diffstat (limited to 'public/v4/apps/rsync-looped.yml')
| -rw-r--r-- | public/v4/apps/rsync-looped.yml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/public/v4/apps/rsync-looped.yml b/public/v4/apps/rsync-looped.yml new file mode 100644 index 0000000..ab8180e --- /dev/null +++ b/public/v4/apps/rsync-looped.yml @@ -0,0 +1,54 @@ +captainVersion: 4 +services: + $$cap_appname: + caproverExtra: + notExposeAsWebApp: 'true' + dockerfileLines: + - FROM alpine:3.15.0 + - RUN apk update && apk add openssh rsync nano openssl bash + - ADD https://gist.githubusercontent.com/githubsaturn/b092f0f784263ebf2696c5613e9144e5/raw/0bd25d5bf7970e518bcfcfd58ca156e74b343afe/rsync-looper.sh / + - RUN chmod +x /rsync-looper.sh + - CMD /rsync-looper.sh + environment: + REMOTE_SOURCE_DIRECTORY: $$cap_REMOTE_SOURCE_DIRECTORY + PRIVATE_KEY_BASE_64: $$cap_PRIVATE_KEY_BASE_64 + REMOTE_SSH_PORT: $$cap_REMOTE_SSH_PORT + REMOTE_SSH_ADDRESS: $$cap_REMOTE_SSH_ADDRESS + REMOTE_SSH_USER: $$cap_REMOTE_SSH_USER + RSYNC_SLEEP_GAP: 30s + volumes: + - $$cap_appname-target-directory:/target-dir +caproverOneClickApp: + variables: + - id: $$cap_REMOTE_SOURCE_DIRECTORY + label: Remote source location + description: The remote directory from which the content will be downloaded + defaultValue: '/backup-files/' + + - id: $$cap_PRIVATE_KEY_BASE_64 + label: The base64 encoded version of private key for establish the SSH connection. + description: To convert your private to base64, run `cat private.key | openssl base64 | tr -d '\n'` + validRegex: /.{20,}/ + + - id: $$cap_REMOTE_SSH_PORT + label: The remote SSH port. + defaultValue: '22' + + - id: $$cap_REMOTE_SSH_ADDRESS + label: The remote SSH address. + description: Either an IP or a host such as captain.domain.com - DO NOT add HTTP(S) + validRegex: /.{3,}/ + + - id: $$cap_REMOTE_SSH_USER + label: The remote SSH User + description: Usually root, unless you set up another user + validRegex: /.{1,}/ + instructions: + start: >- + This app sets up a simple linux container with "rsync". The rsync process checks to see if there is any new files to be downloaded, and it downloads them immediately. + ** IMPORTANT: ** Make sure `rsync` is installed on the remote machine. If you're SSHing into a container, make sure `rsync` is installed in the container. + end: >- + The container is built and deployed. You can view the logs by going to Apps > $$cap_appname > deployment tab + displayName: RSync Container + isOfficial: false + description: Just a simple container that has runs rsync to download content periodically |
