From 7f73907f7e28d299e3880b4f32eba9ee41caa126 Mon Sep 17 00:00:00 2001 From: Koldo Aingeru Date: Sat, 5 Oct 2019 12:53:49 +0200 Subject: [PATCH 1/3] cloud commander support --- README.md | 2 ++ docs/applications/cloudcmd.md | 11 ++++++++++ docs/configuration/application_ports.md | 1 + group_vars/all.yml.dist | 11 ++++++++++ nas.yml | 4 ++++ tasks/cloudcmd.yml | 29 +++++++++++++++++++++++++ templates/traefik/traefik.toml | 1 + 7 files changed, 59 insertions(+) create mode 100644 docs/applications/cloudcmd.md create mode 100644 tasks/cloudcmd.yml diff --git a/README.md b/README.md index d2d21568..ae07d489 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,13 @@ Ansible config and a bunch of Docker containers. * A Docker host with Portainer for image and container management * An automatic dynamic DNS updater if you use Cloudflare to host your domain DNS * A Personal finance manager +* A dual panel local file manager ### Docker Containers Used * [Airsonic](https://airsonic.github.io/) - catalog and stream music * [Bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs) - Self-Hosting port of password manager +* [Cloud Commander](https://cloudcmd.io/) - A dual panel file manager with integrated web console and text editor * [Cloudflare DDNS](https://hub.docker.com/r/joshuaavalon/cloudflare-ddns/) - automatically update Cloudflare with your IP address * [CouchPotato](https://couchpota.to/) - for downloading and managing movies * [Duplicati](https://www.duplicati.com/) - for backing up your stuff diff --git a/docs/applications/cloudcmd.md b/docs/applications/cloudcmd.md new file mode 100644 index 00000000..8f989da0 --- /dev/null +++ b/docs/applications/cloudcmd.md @@ -0,0 +1,11 @@ +# Cloud Commander file manager + +Homepage: [https://cloudcmd.io/](https://cloudcmd.io/) + + +Cloud Commander is a file manager for the web. It includes a command-line console and a text editor. Cloud Commander helps you manage your server and work with files, directories and programs in a web browser from any computer, mobile or tablet. + + +## Usage + +Set `cloudcmd_enabled: true` in your `group_vars/all.yml` file. Then setup the folder you want to manager with `cloudcmd_browse_directory`, if you define it as `/` you will see all of your nas in `/mnt/fs`. \ No newline at end of file diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index f0f8e848..ca40c89e 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -4,6 +4,7 @@ By default, applications can be found on the ports listed below. | Application | Port | Notes | |-----------------|--------|-----------| +| Cloud Commander | 7373 | | | Couchpotato | 5050 | | | Bitwarden "hub" | 3012 | Web Not. | | Bitwarden | 19080 | HTTP | diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index 6b316b22..3f8e5bd3 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -54,6 +54,8 @@ guacamole_enabled: false netdata_enabled: false watchtower_enabled: false cloudflare_ddns_enabled: false +cloudcmd_enabled: true + # Backup & Restore duplicati_enabled: false @@ -476,6 +478,15 @@ miniflux_admin_password: supersecure airsonic_available_externally: "false" airsonic_data_directory: "{{ docker_home }}/airsonic" +### +### CloudCmd +### +cloudcmd_available_externally: "false" +cloudcmd_data_directory: "{{ docker_home }}/cloudcmd/config" +cloudcmd_browse_directory: "/" +cloudcmd_user_id: 0 +cloudcmd_group_id: 0 + ### ### Watchtower ### diff --git a/nas.yml b/nas.yml index c351ca5e..10074162 100644 --- a/nas.yml +++ b/nas.yml @@ -171,3 +171,7 @@ - import_tasks: tasks/mosquitto.yml when: (mosquitto_enabled | default(False)) tags: mosquitto + + - import_tasks: tasks/cloudcmd.yml + when: (cloudcmd_enabled | default(False)) + tags: cloudcmd diff --git a/tasks/cloudcmd.yml b/tasks/cloudcmd.yml new file mode 100644 index 00000000..082b70c3 --- /dev/null +++ b/tasks/cloudcmd.yml @@ -0,0 +1,29 @@ +--- +- name: Create CloudCmd Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ cloudcmd_data_directory }}" + +- name: CloudCmd + docker_container: + name: cloudcmd + image: coderaiser/cloudcmd + pull: true + volumes: + - "{{ cloudcmd_data_directory }}:/config:rw" + - "{{ cloudcmd_browse_directory }}:/mnt/fs" + ports: + - "7373:8000" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ cloudcmd_user_id }}" + PGID: "{{ cloudcmd_group_id }}" + restart_policy: unless-stopped + memory: 1g + labels: + traefik.backend: "cloudcmd" + traefik.frontend.rule: "Host:cloudcmd.{{ ansible_nas_domain }}" + traefik.enable: "{{ cloudcmd_available_externally }}" + traefik.port: "7373" \ No newline at end of file diff --git a/templates/traefik/traefik.toml b/templates/traefik/traefik.toml index c22832eb..419f5eeb 100644 --- a/templates/traefik/traefik.toml +++ b/templates/traefik/traefik.toml @@ -181,6 +181,7 @@ onDemand = false # create certificate when container is created # we request a certificate for everything, because why not. sans = ["airsonic.{{ ansible_nas_domain }}", "bitwarden.{{ ansible_nas_domain }}", + "cloudcmd.{{ ansible_nas_domain }}", "couchpotato.{{ ansible_nas_domain }}", "duplicati.{{ ansible_nas_domain }}", "emby.{{ ansible_nas_domain }}", From 3adf294acc12aaa55cf263c1e91f3a468af39b7e Mon Sep 17 00:00:00 2001 From: Koldo Aingeru Date: Wed, 16 Oct 2019 19:04:12 +0200 Subject: [PATCH 2/3] update upstream --- nas.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nas.yml b/nas.yml index e6ec6725..2d5ac718 100644 --- a/nas.yml +++ b/nas.yml @@ -172,10 +172,6 @@ when: (mosquitto_enabled | default(False)) tags: mosquitto - - import_tasks: tasks/cloudcmd.yml - when: (cloudcmd_enabled | default(False)) - tags: cloudcmd - - import_tasks: tasks/calibre.yml when: (calibre_enabled | default(False)) tags: calibre From 03089a49f9790f49c1f6266c3e15ec72607ace0f Mon Sep 17 00:00:00 2001 From: Koldo Aingeru Date: Wed, 16 Oct 2019 19:10:31 +0200 Subject: [PATCH 3/3] fix --- nas.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nas.yml b/nas.yml index 2d5ac718..a5145b4b 100644 --- a/nas.yml +++ b/nas.yml @@ -190,5 +190,4 @@ - import_tasks: tasks/cloudcmd.yml when: (cloudcmd_enabled | default(False)) - tags: cloudcmd - tags: homeassistant + tags: cloudcmd \ No newline at end of file