saltyorg / Sandbox

Saltbox Sandbox
GNU General Public License v3.0
64 stars 91 forks source link

Add role: Maintainerr #275

Closed dabigc closed 9 months ago

dabigc commented 11 months ago

Description

Maintainerr makes managing your media easy. Create custom rules with parameters across different services, show matching media on the Plex home screen for a given amount of days and handle the deletion.

Github Repository: https://github.com/jorenn92/Maintainerr Docker image: jorenn92/maintainerr

How Has This Been Tested?

To be done

Create a docs page entry for this new role

RaneyDazed commented 11 months ago

suggestion on your format, it should line up with all of the other submissions as follows:

conditionals line up w the first of the curly braces on the previous line and symbols line up w the role_name from the previous line.

maintainerr_traefik_middleware: "{{ maintainerr_traefik_middleware_default + ','
                                  + maintainerr_traefik_middleware_custom + ','
                                  + maintainerr_traefik_themepark_middleware
                               if (not maintainerr_traefik_middleware_custom.startswith(',') and maintainerr_traefik_middleware_custom | length > 0)
                               else maintainerr_traefik_middleware_default
                                  + maintainerr_traefik_middleware_custom
                                  + maintainerr_traefik_themepark_middleware }}"
maintainerr_traefik_middleware: "{{ maintainerr_traefik_middleware_default + ','
                                    + maintainerr_traefik_middleware_custom + ','
                                    + maintainerr_traefik_themepark_middleware
                                 if (not maintainerr_traefik_middleware_custom.startswith(',') and maintainerr_traefik_middleware_custom | length > 0)
                                 else maintainerr_traefik_middleware_default
                                    + maintainerr_traefik_middleware_custom
                                    + maintainerr_traefik_themepark_middleware }}"
RaneyDazed commented 11 months ago

what does the cache dir do? (maintainerr_paths_cache: "{{ maintainerr_paths_location }}/cache") overseer has a cache dir, but I don't see any reason for this to have one. same with the themepark addition. afaik this doesn't and won't have support for that.

the UMASK env var seems out of place as well. It looks like you copied overseerr but left a lot of overseerr specific variables in place. Have you tested the instancing you included with inventory? ie

maintainerr_instances: ["maintainerr","maintainerrx"]

RaneyDazed commented 11 months ago

@dabigc maybe give this a spin. I removed the cache dir, the UMASK env, and all the references to themepark. Its very possible that won't be enough to get it to work, but if you intend to see this through I suggest maybe making a few edits to things? Its not that tough to do. You can probably leave the instance bits in there, as long as you test it and try to make another maintainerr instance. Otherwise copy a simpler role as an example. I may have fudged the middleware/traefik bit too. Any who, if you don't get to it I might finish the role. But I'll put my name in there instead of yours :p

an example of testing it after I changed it up some is that IDK that it needs the LOG_LEVEL env. I didn't look it up. tyvm, have fun!

##########################################################################
# Title:         Saltbox: Maintainerr | Default Variables                #
# Author(s):     dabigc                                                  #
# URL:           https://github.com/saltyorg/Saltbox                     #
# --                                                                     #
##########################################################################
#                   GNU General Public License v3.0                      #
##########################################################################
---
################################
# Basics
################################

maintainerr_instances: ["maintainerr"]

################################
# Paths
################################

maintainerr_paths_folder: "{{ maintainerr_name }}"
maintainerr_paths_location: "{{ server_appdata_path }}/{{ maintainerr_paths_folder }}"
maintainerr_paths_folders_list:
  - "{{ maintainerr_paths_location }}"

################################
# Web
################################

maintainerr_web_subdomain: "{{ maintainerr_name }}"
maintainerr_web_domain: "{{ user.domain }}"
maintainerr_web_port: "80"
maintainerr_web_url: "{{ 'https://' + lookup('vars', maintainerr_name + '_web_subdomain', default=maintainerr_web_subdomain)
                          + '.' + lookup('vars', maintainerr_name + '_web_domain', default=maintainerr_web_domain) }}"

################################
# DNS
################################

maintainerr_dns_record: "{{ lookup('vars', maintainerr_name + '_web_subdomain', default=maintainerr_web_subdomain) }}"
maintainerr_dns_zone: "{{ lookup('vars', maintainerr_name + '_web_domain', default=maintainerr_web_domain) }}"
maintainerr_dns_proxy: "{{ dns.proxied }}"

################################
# Settings
################################

maintainerr_log_level: "info"

################################
# Traefik
################################

maintainerr_traefik_sso_middleware: "{{ traefik_default_sso_middleware }}"
maintainerr_traefik_middleware_default: "{{ traefik_default_middleware + ','
                                            + lookup('vars', maintainerr_name + '_traefik_sso_middleware', default=maintainerr_traefik_sso_middleware)
                                         if (lookup('vars', maintainerr_name + '_traefik_sso_middleware', default=maintainerr_traefik_sso_middleware) | length > 0)
                                         else traefik_default_middleware }}"
maintainerr_traefik_middleware_custom: ""
maintainerr_traefik_middleware: "{{ maintainerr_traefik_middleware_default + ','
                                    + maintainerr_traefik_middleware_custom
                                 if (not maintainerr_traefik_middleware_custom.startswith(',') and maintainerr_traefik_middleware_custom | length > 0)
                                 else maintainerr_traefik_middleware_default
                                    + maintainerr_traefik_middleware_custom }}"

maintainerr_traefik_certresolver: "{{ traefik_default_certresolver }}"
maintainerr_traefik_enabled: true

################################
# Docker
################################

# Container
maintainerr_docker_container: "{{ maintainerr_name }}"

# Image
maintainerr_docker_image_pull: true
maintainerr_docker_image_repo: "jorenn92/maintainerr"
maintainerr_docker_image_tag: "latest"
maintainerr_docker_image: "{{ lookup('vars', maintainerr_name + '_docker_image_repo', default=maintainerr_docker_image_repo)
                              + ':' + lookup('vars', maintainerr_name + '_docker_image_tag', default=maintainerr_docker_image_tag) }}"

# Ports
maintainerr_docker_ports_defaults: []
maintainerr_docker_ports_custom: []
maintainerr_docker_ports: "{{ lookup('vars', maintainerr_name + '_docker_ports_defaults', default=maintainerr_docker_ports_defaults)
                              + lookup('vars', maintainerr_name + '_docker_ports_custom', default=maintainerr_docker_ports_custom) }}"

# Envs
maintainerr_docker_envs_default:
  TZ: "{{ tz }}"
  LOG_LEVEL: "{{ maintainerr_log_level }}"
maintainerr_docker_envs_custom: {}
maintainerr_docker_envs: "{{ lookup('vars', maintainerr_name + '_docker_envs_default', default=maintainerr_docker_envs_default)
                             | combine(lookup('vars', maintainerr_name + '_docker_envs_custom', default=maintainerr_docker_envs_custom)) }}"

# Commands
maintainerr_docker_commands_default: []
maintainerr_docker_commands_custom: []
maintainerr_docker_commands: "{{ lookup('vars', maintainerr_name + '_docker_commands_default', default=maintainerr_docker_commands_default)
                                 + lookup('vars', maintainerr_name + '_docker_docker_commands_custom', default=maintainerr_docker_commands_custom) }}"

# Volumes
maintainerr_docker_volumes_default:
  - "{{ maintainerr_paths_location }}:/opt/data"
maintainerr_docker_volumes_custom: []
maintainerr_docker_volumes: "{{ lookup('vars', maintainerr_name + '_docker_volumes_default', default=maintainerr_docker_volumes_default)
                                + lookup('vars', maintainerr_name + '_docker_volumes_custom', default=maintainerr_docker_volumes_custom) }}"

# Devices
maintainerr_docker_devices_default: []
maintainerr_docker_devices_custom: []
maintainerr_docker_devices: "{{ lookup('vars', maintainerr_name + '_docker_devices_default', default=maintainerr_docker_devices_default)
                                + lookup('vars', maintainerr_name + '_docker_devices_custom', default=maintainerr_docker_devices_custom) }}"

# Hosts
maintainerr_docker_hosts_default: []
maintainerr_docker_hosts_custom: []
maintainerr_docker_hosts: "{{ docker_hosts_common
                              | combine(lookup('vars', maintainerr_name + '_docker_hosts_default', default=maintainerr_docker_hosts_default))
                              | combine(lookup('vars', maintainerr_name + '_docker_hosts_custom', default=maintainerr_docker_hosts_custom)) }}"

# Labels
maintainerr_docker_labels_default: {}
maintainerr_docker_labels_custom: {}
maintainerr_docker_labels: "{{ docker_labels_common
                               | combine(lookup('vars', maintainerr_name + '_docker_labels_default', default=maintainerr_docker_labels_default))
                               | combine((lookup('vars', maintainerr_name),
                          lookup('vars', maintainerr_name + '_docker_labels_custom', default=maintainerr_docker_labels_custom)) }}"

# Hostname
maintainerr_docker_hostname: "{{ maintainerr_name }}"

# Network Mode
maintainerr_docker_network_mode_default: "{{ docker_networks_name_common }}"
maintainerr_docker_network_mode: "{{ lookup('vars', maintainerr_name + '_docker_network_mode_default', default=maintainerr_docker_network_mode_default) }}"

# Networks
maintainerr_docker_networks_alias: "{{ maintainerr_name }}"
maintainerr_docker_networks_default: []
maintainerr_docker_networks_custom: []
maintainerr_docker_networks: "{{ docker_networks_common
                                 + lookup('vars', maintainerr_name + '_docker_networks_default', default=maintainerr_docker_networks_default)
                                 + lookup('vars', maintainerr_name + '_docker_networks_custom', default=maintainerr_docker_networks_custom) }}"

# Capabilities
maintainerr_docker_capabilities_default: []
maintainerr_docker_capabilities_custom: []
maintainerr_docker_capabilities: "{{ lookup('vars', maintainerr_name + '_docker_capabilities_default', default=maintainerr_docker_capabilities_default)
                                     + lookup('vars', maintainerr_name + '_docker_capabilities_custom', default=maintainerr_docker_capabilities_custom) }}"

# Security Opts
maintainerr_docker_security_opts_default: []
maintainerr_docker_security_opts_custom: []
maintainerr_docker_security_opts: "{{ lookup('vars', maintainerr_name + '_docker_security_opts_default', default=maintainerr_docker_security_opts_default)
                                      + lookup('vars', maintainerr_name + '_docker_security_opts_custom', default=maintainerr_docker_security_opts_custom) }}"

# Restart Policy
maintainerr_docker_restart_policy: unless-stopped

# State
maintainerr_docker_state: started

# User
maintainerr_docker_user: "{{ uid }}:{{ gid }}"
RaneyDazed commented 11 months ago

@dabigc maybe give this a spin. I removed the cache dir, the UMASK env, and all the references to themepark. Its very possible that won't be enough to get it to work, but if you intend to see this through I suggest maybe making a few edits to things? Its not that tough to do. You can probably leave the instance bits in there, as long as you test it and try to make another maintainerr instance. Otherwise copy a simpler role as an example. I may have fudged the middleware/traefik bit too. Any who, if you don't get to it I might finish the role. But I'll put my name in there instead of yours :p

an example of testing it after I changed it up some is that IDK that it needs the LOG_LEVEL env. I didn't look it up. tyvm, have fun!

# Truncated for brevity 

# User
maintainerr_docker_user: "{{ uid }}:{{ gid }}"

I suppose we ought to find out if it supports PUID/GUID or if it really needs the user mapping of

# User
maintainerr_docker_user: "{{ uid }}:{{ gid }}"
maximuskowalski commented 11 months ago

If you wanted to @RaneyDazed you could also fork @dabigc's repo and submit your changes as a PR to that repo.

nebb00 commented 10 months ago

Anyway to get this commited?

maximuskowalski commented 10 months ago

Anyway to get this commited?

Yes, fix the issues, but it will also need to be converted to traefik3 format now to be merged.

keldian commented 10 months ago

I finally got around to trying out this app, and I have to say it feels unfinished. The UI is somewhat clunky and crash-prone? Also, recent discussion on the project repo has the dev saying it's untested in scenarios I don't view as unusual for Saltbox.

FWIW, even if a proper PR gets submitted, I'd recommend against adding it to Sandbox, at least until it's more fleshed out. We have a big list of candidates for what this app aims to accomplish, and not yet enough feedback to place one or two above the rest.

nebb00 commented 10 months ago

I finally got around to trying out this app, and I have to say it feels unfinished. The UI is somewhat clunky and crash-prone? Also, recent discussion on the project repo has the dev saying it's untested in scenarios I don't view as unusual for Saltbox.

FWIW, even if a proper PR gets submitted, I'd recommend against adding it to Sandbox, at least until it's more fleshed out. We have a big list of candidates for what this app aims to accomplish, and not yet enough feedback to place one or two above the rest.

I agree after some testing

maximuskowalski commented 10 months ago

So we should probably push it to the sandpit for now?

keldian commented 10 months ago

I would say so, yes. I can send the recipe I made for saltbox_mod, though I'm not sure where Sandpit stands in regards to Traefik3? I could convert it and send in either format.

keldian commented 9 months ago

FYI,

I hope most people know Maintainerr is beta software and don’t expect a fully fleshed out app. Maybe some day, but we’re not there yet.

https://www.github.com/jorenn92/Maintainerr/issues/459#issuecomment-1720158418

saltydk commented 9 months ago

@maximuskowalski @owine review this before the end of the weekend, merge it to traefik3 or close it.

owine commented 9 months ago

Closing as this was added to Sandpit