Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
@@ -0,0 +1,18 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# defaults file for docker-comic-utils
|
||||
app_name: "comic-utils"
|
||||
app_dns_name: "comic-utils"
|
||||
app_base_dir: "{{ (docker_apps_dir, app_name) | path_join }}"
|
||||
app_base_domain: "{{ app_dns_name ~ '.' ~ host_base_domain }}"
|
||||
app_extra_domains: ["comic-utils.homelan"]
|
||||
app_proxy_network: "traefik-proxy-net"
|
||||
|
||||
comicutils_image_name: "allaboutduncan/comic-utils-web:latest"
|
||||
comicutils_config_dir: "config"
|
||||
comicutils_data_dir: "data"
|
||||
comicutils_cache_dir: "cache"
|
||||
comicutils_downloads_dir: "downloads"
|
||||
comicutils_data_extramounts:
|
||||
Comics: "./data/Comics"
|
||||
Comics_Staging: "./data/Comics_Staging"
|
||||
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# handlers file for docker-comic-utils
|
||||
@@ -0,0 +1,35 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.2
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
@@ -0,0 +1,22 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# tasks file for docker-comic-utils
|
||||
|
||||
- name: Run Compose App Init
|
||||
ansible.builtin.import_role:
|
||||
name: docker-common
|
||||
tasks_from: compose-app-init
|
||||
tags: [create, docker-comic-utils]
|
||||
|
||||
- name: Run Compose App Start
|
||||
ansible.builtin.import_role:
|
||||
name: docker-common
|
||||
tasks_from: compose-app-start
|
||||
tags: [create, docker-comic-utils]
|
||||
|
||||
- name: Run Compose App Stop
|
||||
ansible.builtin.import_role:
|
||||
name: docker-common
|
||||
tasks_from: compose-app-stop
|
||||
tags: [never, stop-docker-comic-utils]
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
|
||||
services:
|
||||
{{ app_name }}:
|
||||
image: {{ comicutils_image_name }}
|
||||
container_name: {{ app_name }}
|
||||
logging:
|
||||
options:
|
||||
max-size: 20m # Reduce log size to 20MB
|
||||
max-file: "3" # Keep only 3 rotated files
|
||||
restart: unless-stopped
|
||||
{% if app_proxy_network is none %}
|
||||
ports:
|
||||
- 5577:5577
|
||||
{% endif %}
|
||||
networks:
|
||||
{% if app_proxy_network is not none %}
|
||||
{{ app_proxy_network }}:
|
||||
{% else %}
|
||||
{{ app_name ~ "-net" }}:
|
||||
{% endif %}
|
||||
volumes:
|
||||
- {{ docker_socket_path }}:/tmp/docker.sock:ro
|
||||
- ./{{ comicutils_config_dir }}:/config
|
||||
- ./{{ comicutils_cache_dir }}:/cache
|
||||
## Additional folder is you want to use Folder Monitoring.
|
||||
- ./{{ comicutils_downloads_dir }}:/downloads
|
||||
- ./{{ comicutils_data_dir }}:/data
|
||||
{% for m in comicutils_data_extramounts %}
|
||||
{{ "- " ~ comicutils_data_extramounts[m] ~ ":/data/" ~ m}}
|
||||
{% endfor %}
|
||||
environment:
|
||||
- FLASK_ENV=development
|
||||
## Set to 'yes' if you want to use folder monitoring.
|
||||
- MONITOR=no
|
||||
## Set the User ID (PUID) and Group ID (PGID) for the container.
|
||||
## This is often needed to resolve permission issues, especially on systems like Unraid
|
||||
## where a specific user/group owns the files.
|
||||
## For Unraid, PUID is typically 99 (user 'nobody') and PGID is typically 100 (group 'users').
|
||||
## For Windows/WSL, you need to set these to match your Windows user ID (see WINDOWS_WSL_SETUP.md)
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
## Set the file creation mask (UMASK). 022 is a common value.
|
||||
# - UMASK=022
|
||||
{% if app_proxy_network is not none %}
|
||||
labels:
|
||||
traefik.enable: true
|
||||
traefik.docker.network: "{{ app_proxy_network }}"
|
||||
traefik.http.routers.{{ app_name }}-http.rule: "Host(`{{ app_base_domain }}`){%- for d in app_extra_domains %}{{ "||Host(`" ~ d ~ "`)" }}{% endfor %}"
|
||||
traefik.http.routers.{{ app_name }}-http.entryPoints: web
|
||||
traefik.http.services.{{ app_name }}.loadbalancer.server.port: 5577
|
||||
{% endif %}
|
||||
|
||||
|
||||
networks:
|
||||
{% if app_proxy_network is not none %}
|
||||
{{ app_proxy_network }}:
|
||||
external: true
|
||||
{% else %}
|
||||
{{ app_name ~ "-net" }}:
|
||||
{% endif %}
|
||||
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
localhost
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- docker-comic-utils
|
||||
@@ -0,0 +1,3 @@
|
||||
#SPDX-License-Identifier: MIT-0
|
||||
---
|
||||
# vars file for docker-comic-utils
|
||||
Reference in New Issue
Block a user