forked from scsibug/nostr-rs-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b35e626
commit d809680
Showing
45 changed files
with
7,821 additions
and
187 deletions.
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,45 @@ | ||
name: publish to ghcr.io | ||
##REF:https://github.com/docker/login-action | ||
|
||
env: | ||
GNOSTR_COMMAND: 'gnostr-relay' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- v** | ||
tags: | ||
- v0.** | ||
- v1.** | ||
- v2.** | ||
- v3.** | ||
- v4.** | ||
#branches-ignore: | ||
# - 'releases/**-alpha' | ||
#tags-ignore: | ||
# - v999.** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
push-store-image: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: '.' | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@main | ||
|
||
- name: 'Login to GitHub Container Registry' | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{github.actor}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: 'Build gnostr-tui image' | ||
run: | | ||
docker build . --tag ghcr.io/gnostr-org/gnostr-tui:latest | ||
docker push ghcr.io/gnostr-org/gnostr-relay:latest |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.gnostr | ||
!.gnostr/gnostr.config.toml | ||
/target | ||
/tls/ |
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,30 @@ | ||
# See contrib/chorus.toml for a documented config file | ||
|
||
data_directory = ".gnostr/relay" | ||
ip_address = "127.0.0.1" | ||
port = 6102 | ||
hostname = "localhost" | ||
use_tls = false | ||
certchain_pem_path = ".gnostr/relay/tls/fullchain.pem" | ||
key_pem_path = ".gnostr/relay/tls/privkey.pem" | ||
name = "gnostr" | ||
description = "gnostr/relay" | ||
open_relay = true | ||
#pubkey for empty sha256 | ||
#e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | ||
user_hex_keys = [ | ||
"a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd" | ||
] | ||
verify_events = true | ||
allow_scraping = true | ||
allow_scrape_if_limited_to = 100 | ||
allow_scrape_if_max_seconds = 7200 | ||
max_subscriptions = 128 | ||
serve_ephemeral = true | ||
serve_relay_lists = true | ||
server_log_level = "Trace" | ||
library_log_level = "Trrace" | ||
client_log_level = "Trace" | ||
enable_ip_blocking = false | ||
minimum_ban_seconds = 0 | ||
timeout_seconds = 0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,18 @@ | ||
FROM rust:latest as base | ||
LABEL org.opencontainers.image.source="https://github.com/gnostr-org/gnostr-relay" | ||
LABEL org.opencontainers.image.description="gnostr-relay-docker" | ||
RUN touch updated | ||
RUN echo $(date +%s) > updated | ||
RUN apt-get update | ||
RUN apt-get install bash libssl-dev pkg-config python-is-python3 systemd -y | ||
RUN chmod +x /usr/bin/systemctl | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
RUN rustup default stable | ||
RUN cargo install gnostr-relay | ||
RUN install ./serve /usr/local/bin || true | ||
ENV PATH=$PATH:/usr/bin/systemctl | ||
RUN ps -p 1 -o comm= | ||
EXPOSE 80 6102 8080 ${PORT} | ||
FROM base as gnostr-relay | ||
RUN [gnostr-relay] | ||
|
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,3 @@ | ||
#!/usr/bin/env bash | ||
cargo build $QUIET --release && \ | ||
./target/release/chorus .gnostr/gnostr.config.toml |
Oops, something went wrong.