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

✨ Add Wallos #131

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ If you have a spare domain name you can configure applications to be accessible
* [Vaultwarden](https://github.com/dani-garcia/vaultwarden) - Self-Hosting port of password manager
* [Virtual Desktop](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom) - A virtual desktop running on your NAS.
* [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later.
* [Wallos](https://github.com/ellite/Wallos) - Open-Source Personal Subscription Tracker.
* [Wanderer](https://github.com/Flomp/wanderer) - A self-hosted trail database.
* [Watchtower](https://github.com/v2tec/watchtower) - Monitor your Docker containers and update them if a new version is available
* [Webtrees](https://www.webtrees.net/index.php/en/) - On-line collaborative genealogy application
Expand Down
4 changes: 4 additions & 0 deletions nas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,10 @@
tags:
- wallabag

- role: wallos
tags:
- wallos

- role: wanderer
tags:
- wanderer
Expand Down
6 changes: 3 additions & 3 deletions roles/formio/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
labels:
traefik.enable: "{{ formio_available_externally | string }}"
traefik.http.routers.formio.rule: "Host(`{{ formio_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.formio.tls.certresolver: "letsencrypt"
traefik.http.routers.formio.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.formio.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
# traefik.http.routers.formio.tls.certresolver: "letsencrypt"
# traefik.http.routers.formio.tls.domains[0].main: "{{ ansible_nas_domain }}"
# traefik.http.routers.formio.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.formio.loadbalancer.server.port: "3001"
when: formio_enabled is true

Expand Down
20 changes: 20 additions & 0 deletions roles/wallos/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
wallos_enabled: false
wallos_available_externally: false

# directories
wallos_data_directory: "{{ docker_home }}/wallos"

# network
wallos_port: "8140"
wallos_hostname: "wallos"

# specs
wallos_memory: 1g

# docker
wallos_container_name: wallos
wallos_image_name: "bellamy/wallos"
wallos_image_version: latest
wallos_user_id: "1000"
wallos_group_id: "1000"
11 changes: 11 additions & 0 deletions roles/wallos/docs/wallos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Wallos

Homepage: [https://github.com/ellite/Wallos](https://github.com/ellite/Wallos)

Open-Source Personal Subscription Tracker

## Usage

Set `wallos_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

wallos web interface can be found at [http://ansible_nas_host_or_ip:8140](http://ansible_nas_host_or_ip:8140).
16 changes: 16 additions & 0 deletions roles/wallos/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
provisioner:
inventory:
group_vars:
all:
wallos_enabled: true
wallos_data_directory: /tmp/wallos
platforms:
- name: instance
image: geerlingguy/docker-ubuntu2204-ansible:latest
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/run/docker.sock:/var/run/docker.sock
- /tmp:/tmp:rw
privileged: true
pre_build_image: true
10 changes: 10 additions & 0 deletions roles/wallos/molecule/default/side_effect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Stop
hosts: all
become: true
tasks:
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
ansible.builtin.include_role:
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
vars:
wallos_enabled: false
19 changes: 19 additions & 0 deletions roles/wallos/molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml

- name: Get wallos container state
community.docker.docker_container:
name: "{{ wallos_container_name }}"
register: result

- name: Check if wallos containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false
19 changes: 19 additions & 0 deletions roles/wallos/molecule/default/verify_stopped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml

- name: Try and stop and remove wallos
community.docker.docker_container:
name: "{{ wallos_container_name }}"
state: absent
register: result

- name: Check if wallos is stopped
ansible.builtin.assert:
that:
- not result.changed
1 change: 1 addition & 0 deletions roles/wallos/requirements.yml
43 changes: 43 additions & 0 deletions roles/wallos/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
- name: Start Wallos
block:
- name: Create Wallos Directories
ansible.builtin.file:
path: "{{ item }}"

Check warning on line 6 in roles/wallos/tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

jinja[spacing]

Jinja2 spacing could be improved: {{ wallos_group_id}} -> {{ wallos_group_id }}
state: directory
owner: "{{ wallos_user_id }}"
group: "{{ wallos_group_id}}"
with_items:
- "{{ wallos_data_directory }}"

- name: Create Wallos Docker Container
community.docker.docker_container:
container_default_behavior: no_defaults
name: "{{ wallos_container_name }}"
image: "{{ wallos_image_name }}:{{ wallos_image_version }}"
pull: true
volumes:
- "{{ wallos_data_directory }}/db:/var/www/html/db"
- "{{ wallos_data_directory }}/logos:/var/www/html/images/uploads/logos"
ports:
- "{{ wallos_port }}:80"
env:
TZ: "{{ ansible_nas_timezone }}"
restart_policy: unless-stopped
memory: "{{ wallos_memory }}"
labels:
traefik.enable: "{{ wallos_available_externally | string }}"
traefik.http.routers.wallos.rule: "Host(`{{ wallos_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.wallos.tls.certresolver: "letsencrypt"
traefik.http.routers.wallos.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.wallos.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.wallos.loadbalancer.server.port: "80"
when: wallos_enabled is true

- name: Stop Wallos
block:
- name: Stop Wallos
community.docker.docker_container:
name: "{{ wallos_container_name }}"
state: absent
when: wallos_enabled is false
14 changes: 14 additions & 0 deletions website/docs/applications/other/wallos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "Wallos"
description: "Open-Source Personal Subscription Tracker"
---

Homepage: [https://github.com/ellite/Wallos](https://github.com/ellite/Wallos)

Open-Source Personal Subscription Tracker

## Usage

Set `wallos_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

wallos web interface can be found at [http://ansible_nas_host_or_ip:8140](http://ansible_nas_host_or_ip:8140).