diff --git a/README.md b/README.md index 0aa81260..87c5e078 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Ansible config and a bunch of Docker containers. * [CouchPotato](https://couchpota.to/) - for downloading and managing movies * [Deluge](https://dev.deluge-torrent.org/) - A lightweight, Free Software, cross-platform BitTorrent client. * [DokuWiki](https://www.dokuwiki.org/) - A simple to use and highly versatile Open Source wiki software that doesn't require a database. +* [Duplicacy](https://duplicacy.com/) - A web UI for the Duplicacy cloud backup program, which provides lock-free deduplication backups to multiple providers * [Duplicati](https://www.duplicati.com/) - for backing up your stuff * [Emby](https://emby.media/) - Media streaming and management * [Firefly III](https://firefly-iii.org/) - Free and open source personal finance manager diff --git a/docs/applications/duplicacy.md b/docs/applications/duplicacy.md new file mode 100644 index 00000000..275cd849 --- /dev/null +++ b/docs/applications/duplicacy.md @@ -0,0 +1,15 @@ +# Duplicacy Cloud Backup + +Homepage: [https://duplicacy.com/](https://duplicacy.com/) + +Duplicacy is a next-generation, cross-platform, cloud backup tool. Duplicacy backs up your files to many cloud storages with client-side encryption and the highest level of deduplication. + +## Usage + +Set `duplicacy_enabled: true` in your `inventories//nas.yml` file. + +Duplicacy's web interface can be found at http://ansible_nas_host_or_ip:3875. + +## Specific Configuration + +The Duplicacy Web UI container has a number of configurations \ No newline at end of file diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 57d82b70..29317649 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -13,6 +13,7 @@ By default, applications can be found on the ports listed below. | Cloud Commander | 7373 | Bridge | HTTP | | Couchpotato | 5050 | Bridge | HTTP | | DokuWiki | 8085 | Bridge | HTTP | +| Duplicacy | 3875 | Bridge | HTTP | | Duplicati | 8200 | Bridge | HTTP | | Emby | 8096 | Bridge | HTTP | | Emby | 8096 | Bridge | HTTP | diff --git a/nas.yml b/nas.yml index 5658cb47..fe417dcc 100644 --- a/nas.yml +++ b/nas.yml @@ -83,6 +83,11 @@ - deluge when: (deluge_enabled | default(False)) + - role: duplicacy + tags: + - duplicacy + when: (duplicacy_enabled | default(False)) + - role: duplicati tags: - duplicati diff --git a/roles/duplicacy/defaults/main.yml b/roles/duplicacy/defaults/main.yml new file mode 100644 index 00000000..e4a5fcfe --- /dev/null +++ b/roles/duplicacy/defaults/main.yml @@ -0,0 +1,24 @@ +--- +duplicacy_enabled: false +duplicacy_available_externally: "false" + +# directories +duplicacy_config_directory: "{{ docker_home }}/duplicacy/config" +duplicacy_logs_directory: "{{ docker_home }}/duplicacy/logs" +duplicacy_cache_directory: "{{ docker_home}}/duplicacy/cache" + +# permissions +duplicacy_data_permissions: "ro" # Change to 'rw' to allow the UI to restore data + +# version +duplicacy_web_version: "Stable" + +# uid / gid +duplicacy_user_id: "0" +duplicacy_group_id: "0" + +# network +duplicacy_port: "3875" +duplicacy_hostname: "duplicacy" + +duplicacy_memory: 1g diff --git a/roles/duplicacy/tasks/main.yml b/roles/duplicacy/tasks/main.yml new file mode 100644 index 00000000..bad16daa --- /dev/null +++ b/roles/duplicacy/tasks/main.yml @@ -0,0 +1,37 @@ +--- +- name: Create Duplicacy Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ duplicacy_config_directory }}" + - "{{ duplicacy_logs_directory }}" + - "{{ duplicacy_cache_directory }}" + +- name: Duplicacy Docker Container + docker_container: + name: duplicacy + image: saspus/duplicacy-web:mini + hostname: "{{ duplicacy_hostname }}" + pull: true + ports: + - "{{ duplicacy_port }}:3875" + volumes: + - "{{ duplicacy_config_directory }}:/config:rw" + - "{{ duplicacy_logs_directory }}:/logs:rw" + - "{{ duplicacy_cache_directory }}:/cache:rw" + - "{{ samba_shares_root }}:/backuproot:{{ duplicacy_data_permissions }}" + env: + DUPLICACY_WEB_VERSION: "{{ duplicacy_web_version }}" + TZ: "{{ ansible_nas_timezone }}" + USR_ID: "{{ duplicacy_user_id }}" + GRP_ID: "{{ duplicacy_group_id }}" + restart_policy: unless-stopped + memory: "{{ duplicacy_memory }}" + labels: + traefik.enable: "{{ duplicacy_available_externally }}" + traefik.http.routers.duplicacy.rule: "Host(`{{ duplicacy_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.duplicacy.tls.certresolver: "letsencrypt" + traefik.http.routers.duplicacy.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.duplicacy.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.duplicacy.loadbalancer.server.port: "3875"