Add a docker compose for federation testing

This commit is contained in:
asonix 2021-01-17 01:31:00 -06:00
parent 071e2ba838
commit c9b1c4fac0
4 changed files with 78 additions and 0 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
/target
Cargo.lock
/server/sled
/docker/federation-test/volumes
/docker/federation-test/hyaenidae-server

View file

@ -0,0 +1,7 @@
FROM ubuntu:20.10
COPY hyaenidae-server /usr/bin/hyaenidae
WORKDIR /app
CMD /usr/bin/hyaenidae

View file

@ -0,0 +1,57 @@
version: "3.3"
services:
pictrs-1:
image: asonix/pictrs:v0.3.0-alpha.4-r0
volumes:
- ./volumes/pictrs-1:/opt/pictrs
pictrs-2:
image: asonix/pictrs:v0.3.0-alpha.4-r0
volumes:
- ./volumes/pictrs-2:/opt/pictrs
pictrs-3:
image: asonix/pictrs:v0.3.0-alpha.4-r0
volumes:
- ./volumes/pictrs-3:/opt/pictrs
hyaenidae-1:
build: .
command: /usr/bin/hyaenidae -d
environment:
- HYAENIDAE_BIND_ADDR=0.0.0.0:8085
- HYAENIDAE_BASE_URL=http://hyaenidae-1:8085
- HYAENIDAE_PICTRS_UPSTREAM=http://pictrs-1:8080
- HYAENIDAE_SECRET_KEY=4jWq4Eg8DRYpXjmf0IZJQgn/x8FPiaNVutdegsZ6a/a/SMGoT/yd49EmKsDIWMvdriYmELy5ammE//nzRfE7Fw==
ports:
- "8085:8085"
depends_on:
- pictrs-1
volumes:
- ./volumes/hyaenidae-1:/app
hyaenidae-2:
build: .
command: /usr/bin/hyaenidae -d
environment:
- HYAENIDAE_BIND_ADDR=0.0.0.0:8086
- HYAENIDAE_BASE_URL=http://hyaenidae-2:8086
- HYAENIDAE_PICTRS_UPSTREAM=http://pictrs-2:8080
- HYAENIDAE_SECRET_KEY=fRAWHRCpmLYEAO/x3T5jSlLRRKhPGjEAHOE9TEeDWdrFZw30l7KfWTUsjFVsbkRJrXmMdHFUXGmQabM9GgDKUQ==
ports:
- "8086:8086"
depends_on:
- pictrs-2
volumes:
- ./volumes/hyaenidae-2:/app
hyaenidae-3:
build: .
command: /usr/bin/hyaenidae -d
environment:
- HYAENIDAE_BIND_ADDR=0.0.0.0:8087
- HYAENIDAE_BASE_URL=http://hyaenidae-3:8087
- HYAENIDAE_PICTRS_UPSTREAM=http://pictrs-3:8080
- HYAENIDAE_SECRET_KEY=Pz93rFFVXSTBidtC12bn86Y5c2rKC4paYslUiKuf08IhE8udga7y+J6jRLAFcRiGnrnGql6omgs1ausw1P2hFg==
ports:
- "8087:8087"
depends_on:
- pictrs-3
volumes:
- ./volumes/hyaenidae-3:/app

12
docker/federation-test/run.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -xe
pushd ../../server
cargo build
popd
cp ../../target/debug/hyaenidae-server .
docker-compose build
docker-compose up