-
Notifications
You must be signed in to change notification settings - Fork 553
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
itxtoledo
wants to merge
2
commits into
caprover:master
Choose a base branch
from
itxtoledo:feat/nostream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+120
−0
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
-------------------------------------------- | ||
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-]+)*))?/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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