| 1 | # Local testing environment: two Prosody servers plus riddim. |
| 2 | # |
| 3 | # docker compose up --build prosody remotemuc riddim |
| 4 | # docker compose run --build --rm tester # sends -ping to the bot, expects a reply |
| 5 | # docker compose run --build --rm muc-tester # same, via the MUC on remotemuc |
| 6 | # |
| 7 | # "prosody" is the bot's own server; "remotemuc" is a federated server whose |
| 8 | # MUC service (muc.remotemuc) the bot also joins. Killing and recreating |
| 9 | # remotemuc simulates a silent MUC disconnect (see `just muc-test`). |
| 10 | # |
| 11 | # The verse build context should point at a local checkout of the Verse |
| 12 | # repository (its upstream hosting is currently offline); override with |
| 13 | # e.g. VERSE_REPO=../../verse if yours lives elsewhere. |
| 14 | services: |
| 15 | prosody: |
| 16 | build: ./prosody |
| 17 | environment: |
| 18 | PROSODY_HOST: prosody |
| 19 | PROSODY_USERS: "riddim:riddimpass tester:testerpass" |
| 20 | remotemuc: |
| 21 | build: ./prosody |
| 22 | environment: |
| 23 | PROSODY_HOST: remotemuc |
| 24 | volumes: |
| 25 | - ./prosody/remotemuc.cfg.lua:/etc/prosody/prosody.cfg.lua:ro |
| 26 | networks: |
| 27 | default: |
| 28 | aliases: |
| 29 | - muc.remotemuc |
| 30 | riddim: |
| 31 | build: |
| 32 | context: .. |
| 33 | additional_contexts: |
| 34 | verse: ${VERSE_REPO:-../../verse} |
| 35 | volumes: |
| 36 | - ./config.lua:/etc/riddim/config.lua:ro |
| 37 | depends_on: |
| 38 | - prosody |
| 39 | - remotemuc |
| 40 | restart: on-failure |
| 41 | tester: |
| 42 | build: |
| 43 | context: .. |
| 44 | additional_contexts: |
| 45 | verse: ${VERSE_REPO:-../../verse} |
| 46 | entrypoint: ["/usr/bin/lua5.4", "/test/tester.lua"] |
| 47 | working_dir: /opt/riddim |
| 48 | volumes: |
| 49 | - ./tester.lua:/test/tester.lua:ro |
| 50 | depends_on: |
| 51 | - riddim |
| 52 | profiles: ["test"] |
| 53 | muc-tester: |
| 54 | build: |
| 55 | context: .. |
| 56 | additional_contexts: |
| 57 | verse: ${VERSE_REPO:-../../verse} |
| 58 | entrypoint: ["/usr/bin/lua5.4", "/test/muc_tester.lua"] |
| 59 | working_dir: /opt/riddim |
| 60 | volumes: |
| 61 | - ./muc_tester.lua:/test/muc_tester.lua:ro |
| 62 | depends_on: |
| 63 | - riddim |
| 64 | profiles: ["test"] |