Skip to content

Commit

Permalink
v0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyMcMillan committed Nov 6, 2024
1 parent b35e626 commit d809680
Show file tree
Hide file tree
Showing 45 changed files with 7,821 additions and 187 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ghcr.io.yml
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.gnostr
!.gnostr/gnostr.config.toml
/target
/tls/
30 changes: 30 additions & 0 deletions .gnostr/gnostr.config.toml
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
68 changes: 34 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "chorus"
version = "1.4.0"
description = "A personal relay for nostr"
authors = ["Mike Dilger <mike@mikedilger.com>"]
name = "gnostr-relay"
version = "0.0.5"
description = "gnostr:a gnostr-relay"
authors = ["gnostt <admin@gnostr.org>", "Mike Dilger <mike@mikedilger.com>"]
license = "MIT"
repository = "https://github.com/mikedilger/chorus"
repository = "https://github.com/gnostr-org/gnostr-relay"
edition = "2021"

[dependencies]
Expand Down
18 changes: 18 additions & 0 deletions Dockerfile
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]

3 changes: 3 additions & 0 deletions gnostr-relay
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
Loading

0 comments on commit d809680

Please sign in to comment.