Compare commits

..
5 Commits
9 changed files with 41 additions and 15 deletions
+15 -6
View File
@@ -4,9 +4,9 @@ A comprehensive Ansible collection for deploying and managing Docker Compose app
## Overview ## Overview
A curated collection of Docker Compose roles for self-hosted applications. Each role depends on the base role in the [`patrickj.docker_compose_app`](https://git.jaroszew.ski/ansible/ansible-role-docker-compose-app) collection (FQCN `patrickj.docker_compose_app.app`) to provide standardized deployment, configuration management, backup procedures, and lifecycle operations across diverse containerized services. A curated collection of Docker Compose roles for self-hosted applications. Each role depends on the base role in the [`patrickj.docker_compose_app`](https://git.jaroszew.ski/ansible/ansible-collection-docker-compose-app) collection (FQCN `patrickj.docker_compose_app.app`) to provide standardized deployment, configuration management, backup procedures, and lifecycle operations across diverse containerized services.
Consult the [base role documentation](https://git.jaroszew.ski/ansible/ansible-role-docker-compose-app/src/branch/main/roles/app/README.md) for guidance on creating custom roles, variable conventions, and integration patterns. Consult the [base role documentation](https://git.jaroszew.ski/ansible/ansible-collection-docker-compose-app/src/branch/main/roles/app/README.md) for guidance on creating custom roles, variable conventions, and integration patterns.
## Features ## Features
@@ -21,13 +21,22 @@ Consult the [base role documentation](https://git.jaroszew.ski/ansible/ansible-r
## Installation ## Installation
### From Git Repository Both this collection and its base dependency (`patrickj.docker_compose_app`) are hosted on Gitea, not on Ansible Galaxy. Install them together via a `requirements.yml` in your playbook repo:
```bash ```yaml
ansible-galaxy collection install https://git.jaroszew.ski/ansible/ansible-collection-docker-apps.git collections:
- name: https://git.jaroszew.ski/ansible/ansible-collection-docker-compose-app.git
type: git
- name: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps.git
type: git
``` ```
### From Local Development Install with:
```bash
ansible-galaxy collection install -r requirements.yml
```
### From local development
```bash ```bash
# From the collection directory # From the collection directory
-1
View File
@@ -16,7 +16,6 @@ tags:
- homelab - homelab
dependencies: dependencies:
"community.docker": ">=1.10.0" "community.docker": ">=1.10.0"
"patrickj.docker_compose_app": ">=1.0.0"
repository: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps repository: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps
documentation: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps/README.md documentation: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps/README.md
homepage: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps homepage: https://git.jaroszew.ski/ansible/ansible-collection-docker-apps
+1 -1
View File
@@ -12,7 +12,7 @@ Glance is a self-hosted dashboard that displays information from various sources
| Variable | Default | Description | | Variable | Default | Description |
|----------|---------|-------------| |----------|---------|-------------|
| `glance_config_template` | `{{ app_templates_path }}/glance.yml.j2` | Template file for generating glance.yml config | | `glance_config_template` | `glance.yml.j2` | Template file for generating glance.yml config (resolved via Ansible's role templates search path) |
| `glance_config_path` | `{{ app_dir }}/config` | Configuration storage | | `glance_config_path` | `{{ app_dir }}/config` | Configuration storage |
| `glance_http_port` | `8080` | Web interface port | | `glance_http_port` | `8080` | Web interface port |
| `glance_container_version` | `latest` | Glance Docker image tag | | `glance_container_version` | `latest` | Glance Docker image tag |
+1 -1
View File
@@ -13,4 +13,4 @@ glance_http_port: 8080
glance_config_path: "{{ app_dir }}/config" glance_config_path: "{{ app_dir }}/config"
# App-specific configuration # App-specific configuration
glance_config_template: "{{ app_templates_path }}/glance.yml.j2" glance_config_template: glance.yml.j2
+1 -1
View File
@@ -15,6 +15,6 @@ dependencies:
- "{{ immich_library_path }}" - "{{ immich_library_path }}"
- "{{ immich_pgdata_path }}" - "{{ immich_pgdata_path }}"
app_extra_templates: app_extra_templates:
- src: "{{ app_templates_path }}/.env.j2" - src: .env.j2
dest: "{{ app_dir }}/.env" dest: "{{ app_dir }}/.env"
app_compose_validate: false app_compose_validate: false
+1 -1
View File
@@ -17,6 +17,6 @@ dependencies:
- "{{ linkwarden_pgdata_path }}" - "{{ linkwarden_pgdata_path }}"
- "{{ linkwarden_meili_data_path }}" - "{{ linkwarden_meili_data_path }}"
app_extra_templates: app_extra_templates:
- src: "{{ app_templates_path }}/.env.j2" - src: .env.j2
dest: "{{ app_dir }}/.env" dest: "{{ app_dir }}/.env"
app_compose_validate: false # Issues validating when needing a .env app_compose_validate: false # Issues validating when needing a .env
+8
View File
@@ -11,6 +11,14 @@ romm_restart_policy: "{{ app_restart_policy | default('unless-stopped') }}"
# Network configuration # Network configuration
romm_http_port: 8080 romm_http_port: 8080
# User the romm container runs as. Defaults to app_uid/app_gid (the ansible
# connection user, or root under become). Override in your playbook to
# align with host user perms on bind-mounted paths (e.g. NFS). Applies to
# the romm service only; mariadb manages its own user internally. Also used
# as the owner of the app-managed subdirectories.
romm_uid: "{{ app_uid }}"
romm_gid: "{{ app_gid }}"
# Volume paths # Volume paths
romm_library_path: "{{ app_dir }}/library" romm_library_path: "{{ app_dir }}/library"
romm_assets_path: "{{ app_dir }}/assets" romm_assets_path: "{{ app_dir }}/assets"
+13 -4
View File
@@ -8,11 +8,20 @@ dependencies:
- role: patrickj.docker_compose_app.app - role: patrickj.docker_compose_app.app
vars: vars:
app_role_name: romm app_role_name: romm
# romm_library_path is intentionally excluded: it's user-managed
# external storage (often on NFS/SMB with pre-existing perms).
# mysql_data_path is chowned to 999:999 mode 0700 for the mariadb
# container's mysql user. App dirs match romm_puid/romm_pgid when set;
# otherwise fall back to the base role's app_uid/app_gid.
app_subdirectories: >- app_subdirectories: >-
{{ {{
[romm_library_path, romm_assets_path, romm_config_path, [
romm_resources_path, romm_mysql_data_path] {'path': romm_assets_path, 'owner': romm_uid, 'group': romm_gid},
+ ([romm_redis_data_path] if romm_redis_data_path else []) {'path': romm_config_path, 'owner': romm_uid, 'group': romm_gid},
{'path': romm_resources_path, 'owner': romm_uid, 'group': romm_gid},
{'path': romm_mysql_data_path, 'owner': 999, 'group': 999, 'mode': '0700'},
]
+ ([{'path': romm_redis_data_path, 'owner': romm_uid, 'group': romm_gid}] if romm_redis_data_path else [])
}} }}
app_backup_subdirectories: app_backup_subdirectories:
- "{{ romm_assets_path }}" - "{{ romm_assets_path }}"
@@ -20,6 +29,6 @@ dependencies:
- "{{ romm_resources_path }}" - "{{ romm_resources_path }}"
- "{{ romm_mysql_data_path }}" - "{{ romm_mysql_data_path }}"
app_extra_templates: app_extra_templates:
- src: "{{ app_templates_path }}/.env.j2" - src: .env.j2
dest: "{{ app_dir }}/.env" dest: "{{ app_dir }}/.env"
app_compose_validate: false app_compose_validate: false
+1
View File
@@ -4,6 +4,7 @@ services:
image: "rommapp/romm:{{ romm_container_version }}" image: "rommapp/romm:{{ romm_container_version }}"
container_name: "{{ romm_container_name }}" container_name: "{{ romm_container_name }}"
restart: "{{ romm_restart_policy }}" restart: "{{ romm_restart_policy }}"
user: "{{ romm_uid }}:{{ romm_gid }}"
env_file: env_file:
- .env - .env
volumes: volumes: