Add web server and relay configuration support

- Introduced a new Dockerfile for building the web server.
- Updated docker-compose.yml to include the web server service with environment variable support for relay URLs.
- Enhanced relay management in relays.go to read from environment variables.
- Updated main.go to provide descriptions for relay configuration in CLI commands.
This commit is contained in:
studiokaiji
2025-11-26 00:24:29 +09:00
parent 535d36bab9
commit 6841ef94bb
5 changed files with 118 additions and 4 deletions

View File

@@ -23,6 +23,12 @@ func main() {
{
Name: "deploy",
Usage: "🌐 Deploy nostr website",
Description: `Deploy your website to Nostr relays.
Relay configuration:
- Set RELAY_URLS environment variable with comma-separated relay URLs to bypass .nostr_relays file
- Example: RELAY_URLS="wss://relay1.com,wss://relay2.com" hostr deploy
- If RELAY_URLS is not set, will read from .nostr_relays file`,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "path",
@@ -160,6 +166,12 @@ func main() {
{
Name: "start",
Usage: "🕺 Wake up web server",
Description: `Start the web server to serve content from Nostr relays.
Relay configuration:
- Set RELAY_URLS environment variable with comma-separated relay URLs to bypass .nostr_relays file
- Example: RELAY_URLS="wss://relay1.com,wss://relay2.com" hostr start
- If RELAY_URLS is not set, will read from .nostr_relays file`,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "port",