From 4c063fdf9eebaf701946b1e1e30f2cd51173db37 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Mon, 23 Jan 2023 10:02:24 -0300 Subject: [PATCH 1/2] added nostream --- public/v4/apps/nostream.yml | 118 +++++++++++++++++++++++++++++++++++ public/v4/logos/nostream.png | Bin 0 -> 8541 bytes 2 files changed, 118 insertions(+) create mode 100644 public/v4/apps/nostream.yml create mode 100644 public/v4/logos/nostream.png diff --git a/public/v4/apps/nostream.yml b/public/v4/apps/nostream.yml new file mode 100644 index 000000000..bd163b344 --- /dev/null +++ b/public/v4/apps/nostream.yml @@ -0,0 +1,118 @@ +captainVersion: 4 +services: + $$cap_appname-postgres: + image: postgres:$$cap_postgres_version + volumes: + - $$cap_appname-postgres-data:/var/lib/postgresql/data + restart: always + environment: + POSTGRES_DB: nostr_ts_relay + POSTGRES_USER: $$cap_pg_user + POSTGRES_PASSWORD: $$cap_pg_password + POSTGRES_INITDB_ARGS: $$cap_pg_initdb_args + caproverExtra: + notExposeAsWebApp: true + + $$cap_appname-redis: + volumes: + - $$cap_appname-redis-data:/data + restart: always + environment: + REDIS_PASSWORD: $$cap_redis_password + caproverExtra: + dockerfileLines: + - FROM redis:$$cap_redis_version + - CMD exec redis-server --requirepass "$REDIS_PASSWORD" + notExposeAsWebApp: true + + $$cap_appname: + volumes: + - $$cap_appname-data:/.nostr + depends_on: + - $$cap_appname-postgres + restart: always + environment: + DB_HOST: srv-captain--$$cap_appname-postgres + DB_PORT: 5432 + DB_USER: $$cap_pg_user + DB_NAME: nostr_ts_relay + DB_PASSWORD: $$cap_pg_password + REDIS_HOST: srv-captain--$$cap_appname-redis + REDIS_PORT: 6379 + REDIS_PASSWORD: $$cap_redis_password + NOSTR_CONFIG_DIR: /.nostr/ + caproverExtra: + containerHttpPort: "8008" + dockerfileLines: + - FROM node:18 AS build + - WORKDIR /build + - RUN git clone -b v$$cap_nostream_version --single-branch https://github.com/Cameri/nostream.git /build + - RUN rm -rf .git + - RUN npm install + - CMD ["npm", "run", "db:migrate"] + - COPY . . + - RUN npm run build + - FROM node:18-alpine3.16 + - WORKDIR /app + - COPY --from=build /build/dist . + - RUN npm install --omit=dev --quiet + - RUN mkdir -p /.nostr + - CMD ["node", "src/index.js"] + notExposeAsWebApp: false + +caproverOneClickApp: + displayName: nostream + isOfficial: true + description: A Nostr Relay written in TypeScript + documentation: https://github.com/Cameri/nostream + + instructions: + start: >- + This is a nostr relay, written in Typescript. + + This implementation is production-ready. + + The project master repository is available on GitHub. + + For more info visit https://github.com/Cameri/nostream + end: |- + nostream has been successfully deployed! + -------------------------------------------- + Before you proceed, please enable Websocket Support and force HTTPS + https://$$cap_root_domain/#/apps/details/$$cap_appname + -------------------------------------------- + App is available as http://$$cap_appname.$$cap_root_domain + + variables: + - id: $$cap_postgres_version + label: Postgres Version + defaultValue: "14.5-alpine" + description: Checkout their page for the valid tags https://hub.docker.com/_/postgres + validRegex: /^([^\s^\/])+$/ + - id: $$cap_pg_user + label: Postgres User + defaultValue: nostr_ts_relay + - id: $$cap_pg_password + label: Password for postgres + defaultValue: $$cap_gen_random_hex(16) + validRegex: /^([^\s^\/])+$/ + - id: $$cap_pg_initdb_args + label: Optional Arguments + description: >- + Arguments will be appended to `postgres initdb`. + Example: `--data-checksums`. + validRegex: /.{0,}/ + - id: $$cap_redis_version + label: Redis Version Tag + description: "Check out their Docker page for the valid tags: https://hub.docker.com/_/redis?tab=tags" + defaultValue: "7.0" + validRegex: /^([^\s^\/])+$/ + - id: $$cap_redis_password + label: Password for redis + defaultValue: $$cap_gen_random_hex(16) + validRegex: /^(\w|[^\s"])+$/ + - id: $$cap_nostream_version + label: nostream version + defaultValue: 1.17.2 + description: Check out their github page for the valid tags https://github.com/Cameri/nostream/releases + validRegex: /(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/ diff --git a/public/v4/logos/nostream.png b/public/v4/logos/nostream.png new file mode 100644 index 0000000000000000000000000000000000000000..88cd3b37d03a0aa31fe6a9aa1f978a1fafd76841 GIT binary patch literal 8541 zcmeHKX;@R|who5D0n`{!%9IK%h=P~~1jHl`0cuH1DU%`r4V3^Y6vA)}L+qhSnB;g7 z31bQ=L7{-mCJ1N=M43aFL_lSpCkc>1$O&4j=k`9e=jpxAZO`M*pS9Ood%f?s_WONn zN8BZT4%q&M#R&_5loS9UCHVowPXWgPveGiLGSafLGO}`VvKu#V-@JL#rp=05x5;nc zrKqgDOL6B;74=UcDymv)J9mDp_pz3?j_zLFk0AO7^!FV2bdTD9Yr3u&ok^+LH#B6}tI!&2%y1!f-q<|8l8>J;ti|vvq z5FiJX-Yx?K%B-hIZ2*F#Wp;qSvbiC`mfK9`(`|p)KQfHYykc%3Q$UdvJPSdk^}+LQX4mKka`6n0Re3QN?Xh9*bRmG z+(_ptDj6RA%I4g+1rNcRv$CHZe=#TS2FL>?kAZ+7021)>%9gfY=zlQ&q#f8``q{PK z!(U$F)c}DM&btuMrBeIXLgH+^Jx|E6!q;oZDf zO>la@?^hWA(!jq+uRd`8eHu?lE#31x41ay2)5GwjEkTOk94)Yv-hcLi{-pIo*&4O& z%rHQi#G|VC&9Pzm4XTQ>oa6X3<VfwH|IyUl1z35%gSs!S zM?8Pn^gD0<=N9}?CjU28KLI@Y4?DU4s>=aRw-{N_vTRa!Suk;GHk1gVw$BdXYG)@z zkzf3`yoZb?&aQCj25%5dxcB_Ek7!1GP7VB$hE9@jpg*lNR#CLgdVYiz94S0d4I8e! zx15zrXTNlD3byIs_LDT|L(P5yrG<0X2#p~=bJ#PM5pQx9;Fk4iWApn)tL2-2t_6OR zGfIk0fb#|&xWC2&x9}nRgR&mw)8%1^3lp)Cr0&DmH=NSP5l&0k8!i^gZoxkhAkwMx10H7>-V&b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va=uWibU5UCDQ8y!dBAW<s{iz$S zzN$r5j~d}bq$WY>Bo8c%xO(HdP9{sipqZ9jL7qA+5R`YWwN-fku)M1CIL+4hXr|!h z%fNh577b}k5(BzP&rZxOV{g=58#Sy#gnCIPTJg(~;Te||?3pnHa?`x&m%XwHuW{0X zS9>SK0FQ|f9nK4c)zXEwQblgwH<>%^`Ut{Gi&>-Il)NXr)S^Zr6 zXDEJU+`ueND_)_+BlLB3&-j30x5P;Q(7hbL##J`9UKKt#7xRhbiiCay2PEHovACXe zkX~hOqgu~Zv^g0x0(*v(3`a6|mPsG)aO9lma76X-_GA2AK_KNw*XNY$qrrKulnJ Date: Mon, 23 Jan 2023 23:17:42 -0300 Subject: [PATCH 2/2] fix redis user --- public/v4/apps/nostream.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/v4/apps/nostream.yml b/public/v4/apps/nostream.yml index bd163b344..49fe0e4f0 100644 --- a/public/v4/apps/nostream.yml +++ b/public/v4/apps/nostream.yml @@ -18,6 +18,7 @@ services: - $$cap_appname-redis-data:/data restart: always environment: + REDIS_USER: default REDIS_PASSWORD: $$cap_redis_password caproverExtra: dockerfileLines: @@ -39,6 +40,7 @@ services: DB_PASSWORD: $$cap_pg_password REDIS_HOST: srv-captain--$$cap_appname-redis REDIS_PORT: 6379 + REDIS_USER: default REDIS_PASSWORD: $$cap_redis_password NOSTR_CONFIG_DIR: /.nostr/ caproverExtra: