From a6a3f5bcaf0bb5ab57bfaf9e480a09ac213ba612 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 7 Feb 2023 16:15:56 +0800 Subject: [PATCH] add nostream --- README.md | 1 + nostream/README.md | 17 +++++++++++++++ nostream/docker-compose.yml | 41 +++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 nostream/README.md create mode 100644 nostream/docker-compose.yml diff --git a/README.md b/README.md index 9285e3a..19e501b 100644 --- a/README.md +++ b/README.md @@ -407,6 +407,7 @@ A collection of delicious docker recipes. - [x] outlinewiki/outline - [x] gabekangas/owncast - [x] owncloud +- [x] jorijn/nostream - [x] chocobozzz/peertube - [x] dpage/pgadmin4 - [x] viktorstrate/photoview diff --git a/nostream/README.md b/nostream/README.md new file mode 100644 index 0000000..a05a3ca --- /dev/null +++ b/nostream/README.md @@ -0,0 +1,17 @@ +nostream +======== + +[Nostream][1] is a nostr relay, written in Typescript. + +## Up and Running + +```bash +$ mkdir -p data/{nostream,redis,postgres} +$ cd data/nostream +$ wget https://github.com/Cameri/nostream/raw/main/resources/default-settings.yaml -O settings.yaml +$ vim settings.yaml +$ docker-compose up -d +$ curl http://127.0.0.1:8008 +``` + +[1]: https://github.com/Cameri/nostream diff --git a/nostream/docker-compose.yml b/nostream/docker-compose.yml new file mode 100644 index 0000000..f19358a --- /dev/null +++ b/nostream/docker-compose.yml @@ -0,0 +1,41 @@ +version: "3.8" + +services: + + nostream: + image: jorijn/nostream:v1.19.0 + ports: + - "8008:8008" + volumes: + - ./data/nostream:/app/etc + environment: + - NOSTR_CONFIG_DIR=/app/etc + - RELAY_PORT=8008 + - SECRET=hackme + - DB_URI=postgresql://nostream:nostream@postgres:5432/nostream + # REDIS_URI=redis://default:nostream@redis:6379 + - REDIS_HOST=redis + - REDIS_PORT=6379 + - REDIS_USER=default + - REDIS_PASSWORD=nostream + depends_on: + - redis + - postgres + restart: unless-stopped + + redis: + image: redis:6-alpine + command: --save 900 1 --requirepass nostream + volumes: + - ./data/redis:/data + restart: unless-stopped + + postgres: + image: postgres:14-alpine + volumes: + - ./data/postgres:/var/lib/postgresql/data + environment: + - POSTGRES_USER=nostream + - POSTGRES_PASSWORD=nostream + - POSTGRES_DB=nostream + restart: unless-stopped