services.ymlΒΆ

---
sso:
  bond: 1
  enabled: "{{ 'web-app-keycloak' in group_names }}"
  shared: "{{ 'web-app-keycloak' in group_names }}"
  flavor: oauth2
  oauth2:
    origin:
      host: bookwyrm
      port: 8000
    allowed_groups:
      - "{{ lookup('rbac_group_path', application_id='web-app-bookwyrm', role='administrator') }}"
logout:
  bond: 1
  enabled: "{{ 'web-svc-logout' in group_names }}"
  shared: "{{ 'web-svc-logout' in group_names }}"
dashboard:
  bond: 1
  enabled: "{{ 'web-app-dashboard' in group_names }}"
  shared: "{{ 'web-app-dashboard' in group_names }}"
matomo:
  bond: 1
  enabled: "{{ 'web-app-matomo' in group_names }}"
  shared: "{{ 'web-app-matomo' in group_names }}"
email:
  bond: 1
  enabled: "{{ MAIL_PROVIDER in group_names }}"
  shared: "{{ MAIL_PROVIDER in group_names }}"
# nocheck: playwright-service-flag β€” DB engine, covered by role-local integration tests
postgres:
  bond: 1
  enabled: true # nocheck: dynamic-flag
  shared: "{{ 'svc-db-postgres' in group_names }}"
  extensions:
    - bloom
# nocheck: shared
# nocheck: dynamic-flag
# nocheck: playwright-service-flag β€” DB engine, covered by role-local integration tests
redis:
  bond: 1
  backup:
    disabled: true
  enabled: true # nocheck: dynamic-flag
  shared: "{{ 'svc-db-redis' in group_names }}"
  cpus: "0.5"
  mem_reservation: 128m
  mem_limit: 512m
  pids_limit: 512
bookwyrm:
  healthcheck:
    flavor: curl
    hostname: localhost
  modes:
    compose:
      enabled: true
    swarm:
      enabled: true
  name: bookwyrm
  image: python
  # TODO: bump when upstream Bookwyrm declares support for Python >= 3.12 in requirements.txt
  # nocheck: docker-version
  version: 3.11-slim
  custom: true
  repository: https://github.com/bookwyrm-social/bookwyrm.git
  ref: v0.9.4
  min_storage: 579MB
  registration_open: false
  allow_invite_request: false
  ports:
    local:
      http: 8049
      sso: 16498
    internal:
      http: 8000
  run_after:
    - web-app-matomo
    - web-app-keycloak
    - web-app-stalwart
    - web-app-mailu
  lifecycle: beta
  cpus: "0.5"
  mem_reservation: 256m
  mem_limit: 1g
  pids_limit: 512
migrate:
  name: bookwyrm-migrate
  custom: true
  # nocheck: single-replica  run-once bootstrap; concurrent migrate/initdb deadlock the migration graph and double-insert the SiteSettings singleton
  replicas: 1
  cpus: "0.5"
  mem_reservation: 256m
  mem_limit: 1g
  pids_limit: 512
# nocheck: shared
# nocheck: dynamic-flag
# nocheck: playwright-service-flag β€” internal sub-component (multi-entity role)
worker:
  name: bookwyrm-worker
  custom: true
  enabled: true # nocheck: dynamic-flag
  cpus: "1.0"
  mem_reservation: 256m
  mem_limit: 1g
  pids_limit: 512
# nocheck: playwright-service-flag β€” object store, no Playwright surface
minio:
  enabled: false # nocheck: dynamic-flag
  shared: false # nocheck: dynamic-flag
  public: true
seaweedfs:
  bond: 1
  enabled: "{{ 'web-app-seaweedfs' in group_names }}"
  shared: "{{ 'web-app-seaweedfs' in group_names }}"
  public: true
# nocheck: playwright-service-flag β€” css consumer, no Playwright surface (provider: web-svc-css)
css:
  bond: 1
  enabled: "{{ 'web-svc-css' in group_names }}"
  shared: "{{ 'web-svc-css' in group_names }}"
prometheus:
  bond: 1
  enabled: "{{ 'web-app-prometheus' in group_names }}"
  shared: "{{ 'web-app-prometheus' in group_names }}"

# nocheck: playwright-service-flag
# nocheck: variants-coverage β€” sso-variant-tor requires the onion on in every variant, so the false polarity has no variant left to live in
tor:
  bond: 0.5
  enabled: "{{ 'svc-net-tor' in group_names }}"
  shared: true # nocheck: dynamic-flag
# nocheck: dynamic-flag
# nocheck: playwright-service-flag, dynamic-flag infrastructure backup consumer
container_backup: # nocheck: bond-baseline backup host joins outside the variant topology
  bond: 1
  enabled: "{{ 'svc-bkp-volume-2-local' in group_names }}"
  shared: true