mirror of
https://github.com/hzrd149/nsite-gateway.git
synced 2025-06-23 12:05:01 +00:00
rename package to nsite-gateway
This commit is contained in:
parent
13f5b2ce20
commit
023e03ec49
5
.changeset/odd-donkeys-listen.md
Normal file
5
.changeset/odd-donkeys-listen.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"nsite-gateway": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Rename package to nsite-gateway
|
@ -1,4 +1,4 @@
|
|||||||
# nsite-ts
|
# nsite-gateway
|
||||||
|
|
||||||
## 0.6.1
|
## 0.6.1
|
||||||
|
|
||||||
|
36
README.md
36
README.md
@ -1,12 +1,12 @@
|
|||||||
# nsite-ts
|
# nsite-gateway
|
||||||
|
|
||||||
A Typescript implementation of [nsite](https://github.com/lez/nsite)
|
A Typescript implementation of [static websites on nostr](https://github.com/nostr-protocol/nips/pull/1538)
|
||||||
|
|
||||||
## Running with docker-compose
|
## Running with docker-compose
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/hzrd149/nsite-ts.git
|
git clone https://github.com/hzrd149/nsite-gateway.git
|
||||||
cd nsite-ts
|
cd nsite-gateway
|
||||||
docker compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -16,24 +16,25 @@ If you need to test, you can directly access the ts server at `http://localhost:
|
|||||||
|
|
||||||
## Running with docker
|
## Running with docker
|
||||||
|
|
||||||
The `ghcr.io/hzrd149/nsite-ts` image can be used to run a http instance locally
|
The `ghcr.io/hzrd149/nsite-gateway` image can be used to run a http instance locally
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run --rm -it --name nsite -p 8080:80 ghcr.io/hzrd149/nsite-ts
|
docker run --rm -it --name nsite -p 8080:80 ghcr.io/hzrd149/nsite-gateway
|
||||||
```
|
```
|
||||||
|
|
||||||
## Manual nginx setup
|
## Manual nginx setup
|
||||||
|
|
||||||
Before manually setting up nginx and nsite-ts you need a few things installed
|
Before manually setting up nginx and nsite-gateway you need a few things installed
|
||||||
- [nginx](https://nginx.org/)
|
|
||||||
- [nodejs](https://nodejs.org/en/download/package-manager) (dep packages [here](https://deb.nodesource.com/))
|
|
||||||
- [pnpm](https://pnpm.io/) run `npm i -g pnpm` to install
|
|
||||||
|
|
||||||
Next your going to need to clone the nsite-ts repo and set it up
|
- [nginx](https://nginx.org/)
|
||||||
|
- [nodejs](https://nodejs.org/en/download/package-manager) (dep packages [here](https://deb.nodesource.com/))
|
||||||
|
- [pnpm](https://pnpm.io/) run `npm i -g pnpm` to install
|
||||||
|
|
||||||
|
Next your going to need to clone the nsite-gateway repo and set it up
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/hzrd149/nsite-ts
|
git clone https://github.com/hzrd149/nsite-gateway
|
||||||
cd nsite-ts
|
cd nsite-gateway
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
pnpm install
|
pnpm install
|
||||||
@ -63,7 +64,7 @@ sudo systemctl daemon-reload
|
|||||||
sudo systemctl start nsite
|
sudo systemctl start nsite
|
||||||
```
|
```
|
||||||
|
|
||||||
Then once nsite-ts is running, next you need to configure nginx
|
Then once nsite-gateway is running, next you need to configure nginx
|
||||||
|
|
||||||
Start by modifying the `/etx/nginx/nginx.conf` file and adding a `proxy_cache_path` to the `http` section
|
Start by modifying the `/etx/nginx/nginx.conf` file and adding a `proxy_cache_path` to the `http` section
|
||||||
|
|
||||||
@ -78,9 +79,10 @@ http {
|
|||||||
```
|
```
|
||||||
|
|
||||||
Next modify the default site config (usually `/etx/nginx/sites-enabled/default` or `/etc/nginx/conf.d/default.conf`) to be one of
|
Next modify the default site config (usually `/etx/nginx/sites-enabled/default` or `/etc/nginx/conf.d/default.conf`) to be one of
|
||||||
- [nginx/http.conf](./nginx/http.conf)
|
|
||||||
- [nginx/tls.conf](./nginx/tls.conf)
|
- [nginx/http.conf](./nginx/http.conf)
|
||||||
- [nginx/tls-and-tor.conf](./nginx/tls-and-tor.conf)
|
- [nginx/tls.conf](./nginx/tls.conf)
|
||||||
|
- [nginx/tls-and-tor.conf](./nginx/tls-and-tor.conf)
|
||||||
|
|
||||||
Once that is done you can restart nginx and you should have a new nsite server running on port 80
|
Once that is done you can restart nginx and you should have a new nsite server running on port 80
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/<path-to>/nsite-ts
|
WorkingDirectory=/<path-to>/nsite-gateway
|
||||||
ExecStart=/usr/bin/node .
|
ExecStart=/usr/bin/node .
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
@ -3,7 +3,7 @@ version: "3.7"
|
|||||||
services:
|
services:
|
||||||
nsite:
|
nsite:
|
||||||
build: .
|
build: .
|
||||||
image: ghcr.io/hzrd149/nsite-ts:master
|
image: ghcr.io/hzrd149/nsite-gateway:master
|
||||||
environment:
|
environment:
|
||||||
LOOKUP_RELAYS: wss://user.kindpag.es,wss://purplepag.es
|
LOOKUP_RELAYS: wss://user.kindpag.es,wss://purplepag.es
|
||||||
SUBSCRIPTION_RELAYS: wss://nostrue.com/,wss://nos.lol/,wss://relay.damus.io/,wss://purplerelay.com/
|
SUBSCRIPTION_RELAYS: wss://nostrue.com/,wss://nos.lol/,wss://relay.damus.io/,wss://purplerelay.com/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "nsite-ts",
|
"name": "nsite-gateway",
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"description": "A blossom server implementation written in Typescript",
|
"description": "A blossom server implementation written in Typescript",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Welcome to nsite-ts</title>
|
<title>Welcome to nsite-gateway</title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
@ -42,8 +42,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Welcome to nsite-ts</h1>
|
<h1>Welcome to nsite-gateway</h1>
|
||||||
<p>If you're seeing this page, nsite-ts has been successfully installed and is working.</p>
|
<p>If you're seeing this page, nsite-gateway has been successfully installed and is working.</p>
|
||||||
|
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p>
|
<p>
|
||||||
@ -59,8 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For more information about configuring nsite-ts, please refer to the
|
For more information about configuring nsite-gateway, please refer to the
|
||||||
<a href="https://github.com/hzrd149/nsite-ts">documentation</a>
|
<a href="https://github.com/hzrd149/nsite-gateway">documentation</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user