Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: added nostream #844

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions public/v4/apps/nostream.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this must be captain.$$cap_root_domain

--------------------------------------------
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: /(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/
Binary file added public/v4/logos/nostream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.