You've already forked tribes-plugin-supertest
forked from tribes/tribes-plugin-template
e360bab329
Use per-node internal identities with a shared relay identity in supertest bootstrap and compose fixtures, and update the runner and lock data for the new node pubkey contract.
147 lines
4.9 KiB
YAML
147 lines
4.9 KiB
YAML
services:
|
|
db-origin:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 2s
|
|
timeout: 3s
|
|
retries: 30
|
|
|
|
db-peer:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 2s
|
|
timeout: 3s
|
|
retries: 30
|
|
|
|
vm-origin:
|
|
image: victoriametrics/victoria-metrics:v1.138.0
|
|
command:
|
|
- -storageDataPath=/victoria-metrics-data
|
|
- -httpListenAddr=:8428
|
|
ports:
|
|
- "48101:8428"
|
|
|
|
vm-peer:
|
|
image: victoriametrics/victoria-metrics:v1.138.0
|
|
command:
|
|
- -storageDataPath=/victoria-metrics-data
|
|
- -httpListenAddr=:8428
|
|
ports:
|
|
- "48102:8428"
|
|
|
|
migrate-origin:
|
|
image: ${TRIBES_SUPERTEST_IMAGE:-tribes-supertest-e2e:latest}
|
|
depends_on:
|
|
db-origin:
|
|
condition: service_healthy
|
|
environment: &origin_env
|
|
MIX_ENV: prod
|
|
PHX_SERVER: "true"
|
|
PORT: "4000"
|
|
PHX_HOST: supertest-origin
|
|
DATABASE_URL: ecto://postgres:postgres@db-origin:5432/tribes_origin
|
|
PARRHESIA_DATABASE_URL: ecto://postgres:postgres@db-origin:5432/parrhesia_origin
|
|
SECRET_KEY_BASE: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
TOKEN_SIGNING_SECRET: supertest-e2e-token-secret
|
|
PARRHESIA_RELAY_URL: ws://supertest-origin:4000/nostr/relay
|
|
PARRHESIA_NODE_IDENTITY_PRIVATE_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
PARRHESIA_RELAY_IDENTITY_PRIVATE_KEY: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
|
|
TRIBES_VICTORIAMETRICS_URL: http://vm-origin:8428
|
|
TRIBES_METRICS_ALLOWED_CIDRS: 0.0.0.0/0,::/0
|
|
command: ["eval", "Tribes.Release.migrate_with_storage_up()"]
|
|
|
|
migrate-peer:
|
|
image: ${TRIBES_SUPERTEST_IMAGE:-tribes-supertest-e2e:latest}
|
|
depends_on:
|
|
db-peer:
|
|
condition: service_healthy
|
|
environment:
|
|
<<: *origin_env
|
|
PHX_HOST: supertest-peer
|
|
DATABASE_URL: ecto://postgres:postgres@db-peer:5432/tribes_peer
|
|
PARRHESIA_DATABASE_URL: ecto://postgres:postgres@db-peer:5432/parrhesia_peer
|
|
PARRHESIA_RELAY_URL: ws://supertest-peer:4000/nostr/relay
|
|
PARRHESIA_NODE_IDENTITY_PRIVATE_KEY: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
TRIBES_VICTORIAMETRICS_URL: http://vm-peer:8428
|
|
command: ["eval", "Tribes.Release.migrate_with_storage_up()"]
|
|
|
|
supertest-origin:
|
|
image: ${TRIBES_SUPERTEST_IMAGE:-tribes-supertest-e2e:latest}
|
|
depends_on:
|
|
db-origin:
|
|
condition: service_healthy
|
|
vm-origin:
|
|
condition: service_started
|
|
environment:
|
|
<<: *origin_env
|
|
TRIBES_BOOTSTRAP_FILE: /etc/tribes/bootstrap.json
|
|
volumes:
|
|
- ${SUPERTEST_PLUGIN_ROOT}/test/e2e/bootstrap/origin.json:/etc/tribes/bootstrap.json:ro
|
|
ports:
|
|
- "46201:4000"
|
|
- "47201:4413"
|
|
command: ["start"]
|
|
|
|
vmagent-origin:
|
|
image: victoriametrics/vmagent:v1.138.0
|
|
network_mode: "service:supertest-origin"
|
|
depends_on:
|
|
supertest-origin:
|
|
condition: service_started
|
|
vm-origin:
|
|
condition: service_started
|
|
volumes:
|
|
- ${SUPERTEST_PLUGIN_ROOT}/test/e2e/vmagent/promscrape.yml:/etc/vmagent/promscrape.yml:ro
|
|
command:
|
|
- -promscrape.config=/etc/vmagent/promscrape.yml
|
|
- -remoteWrite.url=http://vm-origin:8428/api/v1/write
|
|
- -httpListenAddr=127.0.0.1:8429
|
|
|
|
supertest-peer:
|
|
image: ${TRIBES_SUPERTEST_IMAGE:-tribes-supertest-e2e:latest}
|
|
depends_on:
|
|
db-peer:
|
|
condition: service_healthy
|
|
vm-peer:
|
|
condition: service_started
|
|
environment:
|
|
<<: *origin_env
|
|
PHX_HOST: supertest-peer
|
|
DATABASE_URL: ecto://postgres:postgres@db-peer:5432/tribes_peer
|
|
PARRHESIA_DATABASE_URL: ecto://postgres:postgres@db-peer:5432/parrhesia_peer
|
|
PARRHESIA_RELAY_URL: ws://supertest-peer:4000/nostr/relay
|
|
PARRHESIA_NODE_IDENTITY_PRIVATE_KEY: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
TRIBES_VICTORIAMETRICS_URL: http://vm-peer:8428
|
|
TRIBES_BOOTSTRAP_FILE: /etc/tribes/bootstrap.json
|
|
volumes:
|
|
- ${SUPERTEST_PLUGIN_ROOT}/test/e2e/bootstrap/peer.json:/etc/tribes/bootstrap.json:ro
|
|
ports:
|
|
- "46202:4000"
|
|
- "47202:4413"
|
|
command: ["start"]
|
|
|
|
vmagent-peer:
|
|
image: victoriametrics/vmagent:v1.138.0
|
|
network_mode: "service:supertest-peer"
|
|
depends_on:
|
|
supertest-peer:
|
|
condition: service_started
|
|
vm-peer:
|
|
condition: service_started
|
|
volumes:
|
|
- ${SUPERTEST_PLUGIN_ROOT}/test/e2e/vmagent/promscrape.yml:/etc/vmagent/promscrape.yml:ro
|
|
command:
|
|
- -promscrape.config=/etc/vmagent/promscrape.yml
|
|
- -remoteWrite.url=http://vm-peer:8428/api/v1/write
|
|
- -httpListenAddr=127.0.0.1:8429
|