diff --git a/tasks/nightingale.yml b/tasks/nightingale.yml index 6ab72e5..9dd79ec 100644 --- a/tasks/nightingale.yml +++ b/tasks/nightingale.yml @@ -17,6 +17,19 @@ group: www-data mode: "02775" +# Processed-song cache. Bind-mounted into the container at /data/cache and +# reachable over sshfs so songs can be analyzed on a machine with more RAM and +# the results dropped straight in here. Owned by the container's uid (999, fixed +# in razzaru/nightingale) so it can write as owner; group aurbis + setgid lets +# aurbis members (sshfs) create/replace files too. +- name: Create nightingale cache dir (shared with container uid 999 + aurbis) + file: + path: /opt/nightingale/cache + state: directory + owner: "999" + group: aurbis + mode: "02775" + - name: Template nightingale compose template: src: nightingale/docker-compose.yml.j2 diff --git a/tasks/nightingale/docker-compose.yml.j2 b/tasks/nightingale/docker-compose.yml.j2 index bf75d09..71d7d67 100644 --- a/tasks/nightingale/docker-compose.yml.j2 +++ b/tasks/nightingale/docker-compose.yml.j2 @@ -2,13 +2,21 @@ # CPU-only prebuilt image services: nightingale: - image: razzaru/nightingale:latest + image: razzaru/nightingale:1.2.0 restart: unless-stopped ports: - "127.0.0.1:8087:8080" + # Keeps separation resident but forces the alignment spike into swap rather + # than evicting the other stacks and hanging the host. + mem_limit: 9g + memswap_limit: 24g + # /data/cache is bind-mounted so it can be reached over sshfs and songs + # can be pre-processed on a machine with more RAM (see docs/aurbis.wiki). + # Everything else (db, models, vendor) stays in the named volume. volumes: - data:/data - ./songs:/songs:ro + - ./cache:/data/cache environment: NIGHTINGALE_LIBRARY_PATH: /songs