diff --git a/README.md b/README.md index 87c5e078..757be3e0 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Ansible config and a bunch of Docker containers. * [Jackett](https://github.com/Jackett/Jackett) - API Support for your favorite torrent trackers * [Jellyfin](https://jellyfin.github.io) - The Free Software Media System * [Joomla](https://www.joomla.org/) - Open source content management system +* [Komga](https://komga.org/) - a media server for your comics, mangas, BDs and magazines * [Krusader](https://krusader.org/) - Twin panel file management for your desktop * [Lidarr](https://github.com/lidarr/Lidarr) - Music collection manager for Usenet and BitTorrent users * [MiniDLNA](https://sourceforge.net/projects/minidlna/) - simple media server which is fully compliant with DLNA/UPnP-AV clients diff --git a/docs/applications/komga.md b/docs/applications/komga.md new file mode 100644 index 00000000..473da19f --- /dev/null +++ b/docs/applications/komga.md @@ -0,0 +1,12 @@ +# Komga free and open source comics/mangas media server + +Homepage: [https://komga.org/](https://komga.org/) +Docker Image: [https://hub.docker.com/r/gotson/komga](https://hub.docker.com/r/gotson/komga) + +Komga is a media server for your comics, mangas, BDs and magazines. + +## Usage + +Set `komga_enabled: true` in your `inventories//nas.yml` file. + +Access the webui at http://:8088 by default. diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 29317649..ebbc847f 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -37,6 +37,7 @@ By default, applications can be found on the ports listed below. | Jackett | 9117 | Bridge | HTTP | | Jellyfin | 8896 | Bridge | HTTP | | Jellyfin | 8928 | Bridge | HTTPS | +| Komga | 8088 | Bridge | HTTPS | | Krusader | 5800 | Bridge | HTTP | | Krusader | 5900 | Bridge | VNC | | Lidarr | 8686 | Bridge | HTTP | diff --git a/nas.yml b/nas.yml index fe417dcc..6ccbb4ca 100644 --- a/nas.yml +++ b/nas.yml @@ -148,6 +148,11 @@ - jackett when: (jackett_enabled | default(False)) + - role: komga + tags: + - komga + when: (komga_enabled | default(False)) + - role: lidarr tags: - lidarr diff --git a/roles/komga/defaults/main.yml b/roles/komga/defaults/main.yml new file mode 100644 index 00000000..145d0ed9 --- /dev/null +++ b/roles/komga/defaults/main.yml @@ -0,0 +1,19 @@ +--- +# enable or disable the application +komga_enabled: false +komga_available_externally: "false" + +# directories +komga_data_directory: "{{ docker_home }}/komga" +komga_comics_directory: "{{ comics_root }}" + +# uid / gid +komga_user_id: "1000" +komga_group_id: "1000" + +# network +komga_hostname: "komga" +komga_port_http: "8088" + +# specs +komga_memory: "1g" diff --git a/roles/komga/tasks/main.yml b/roles/komga/tasks/main.yml new file mode 100644 index 00000000..d7904913 --- /dev/null +++ b/roles/komga/tasks/main.yml @@ -0,0 +1,35 @@ +--- +- name: Create Komga Directories + file: + path: "{{ item }}" + state: directory + # mode: 0755 + with_items: + - "{{ komga_data_directory }}" + - "{{ komga_data_directory }}/config" + +- name: komga Docker Container + docker_container: + name: komga + image: gotson/komga + pull: true + volumes: + - "{{ komga_comics_directory }}:/comics:ro" + - "{{ komga_data_directory }}:/data:rw" + - "{{ komga_data_directory }}/config:/config:rw" + network_mode: "bridge" + ports: + - "{{ komga_port_http }}:8080" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ komga_user_id }}" + PGID: "{{ komga_group_id }}" + restart_policy: unless-stopped + memory: "{{ komga_memory }}" + labels: + traefik.enable: "{{ komga_available_externally }}" + traefik.http.routers.komga.rule: "Host(`{{ komga_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.komga.tls.certresolver: "letsencrypt" + traefik.http.routers.komga.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.komga.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.komga.loadbalancer.server.port: "8080"