Update 3 files
- /group_vars/all.yml - /roles/flibusta/templates/docker-compose.yml.j2 - /roles/flibusta/tasks/main.yml
This commit is contained in:
parent
31b19a0631
commit
91f0cf08c7
@ -201,6 +201,14 @@ calibre_web_enable_registration: false
|
|||||||
calibre_web_enable_webdav: true
|
calibre_web_enable_webdav: true
|
||||||
calibre_web_enable_opds: true
|
calibre_web_enable_opds: true
|
||||||
|
|
||||||
|
flibusta_base_dir: "{{ service_config_base }}/flibusta"
|
||||||
|
flibusta_books_dir: "/mnt/books/flibusta"
|
||||||
|
flibusta_port: "45135"
|
||||||
|
flibusta_image: "flibusta/fb_tools:full-latest"
|
||||||
|
flibusta_webdav_enabled: true
|
||||||
|
flibusta_opds_enabled: true
|
||||||
|
flibusta_calibre_integration: true
|
||||||
|
|
||||||
# ------------ photo (192.168.1.204) ------------
|
# ------------ photo (192.168.1.204) ------------
|
||||||
immich_base_dir: "/mnt/immich"
|
immich_base_dir: "/mnt/immich"
|
||||||
immich_port: "45131"
|
immich_port: "45131"
|
||||||
|
|||||||
24
roles/flibusta/tasks/main.yml
Normal file
24
roles/flibusta/tasks/main.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure Flibusta directories exist
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
loop:
|
||||||
|
- "{{ flibusta_base_dir }}/config"
|
||||||
|
- "{{ flibusta_base_dir }}/data"
|
||||||
|
- "{{ flibusta_books_dir }}"
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Deploy docker-compose.yml for Flibusta
|
||||||
|
template:
|
||||||
|
src: docker-compose.yml.j2
|
||||||
|
dest: /opt/flibusta/docker-compose.yml
|
||||||
|
mode: '0644'
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Pull and deploy Flibusta container
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: /opt/flibusta
|
||||||
|
pull: yes
|
||||||
|
become: yes
|
||||||
27
roles/flibusta/templates/docker-compose.yml.j2
Normal file
27
roles/flibusta/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
services:
|
||||||
|
flibusta:
|
||||||
|
image: "{{ flibusta_image }}"
|
||||||
|
container_name: flibusta
|
||||||
|
restart: unless-stopped
|
||||||
|
mem_limit: "2g" # ← жёстко, как у тебя везде (jellyfin/audiobookshelf ~2G)
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
ports:
|
||||||
|
- "{{ int_ip }}:{{ flibusta_port }}:8080"
|
||||||
|
environment:
|
||||||
|
- TZ={{ timezone }}
|
||||||
|
- WEBDAV_ENABLED={{ flibusta_webdav_enabled | lower }}
|
||||||
|
- OPDS_ENABLED={{ flibusta_opds_enabled | lower }}
|
||||||
|
volumes:
|
||||||
|
- "{{ flibusta_base_dir }}/config:/app/config:rw"
|
||||||
|
- "{{ flibusta_base_dir }}/data:/app/rw:rw"
|
||||||
|
- "{{ flibusta_books_dir }}:/books:rw"
|
||||||
|
{% if flibusta_calibre_integration %}
|
||||||
|
- "{{ calibre_library_dir }}:/calibre:ro"
|
||||||
|
{% endif %}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
Loading…
Reference in New Issue
Block a user