diff --git a/.changeset/odd-donkeys-listen.md b/.changeset/odd-donkeys-listen.md new file mode 100644 index 0000000..6a56ade --- /dev/null +++ b/.changeset/odd-donkeys-listen.md @@ -0,0 +1,5 @@ +--- +"nsite-gateway": minor +--- + +Rename package to nsite-gateway diff --git a/CHANGELOG.md b/CHANGELOG.md index 48b8827..5b66a6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# nsite-ts +# nsite-gateway ## 0.6.1 diff --git a/README.md b/README.md index 0cfee72..95686e9 100644 --- a/README.md +++ b/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 ```sh -git clone https://github.com/hzrd149/nsite-ts.git -cd nsite-ts +git clone https://github.com/hzrd149/nsite-gateway.git +cd nsite-gateway 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 -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 -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 -Before manually setting up nginx and nsite-ts 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 +Before manually setting up nginx and nsite-gateway you need a few things installed -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 -git clone https://github.com/hzrd149/nsite-ts -cd nsite-ts +git clone https://github.com/hzrd149/nsite-gateway +cd nsite-gateway # install dependencies pnpm install @@ -63,7 +64,7 @@ sudo systemctl daemon-reload 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 @@ -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 - - [nginx/http.conf](./nginx/http.conf) - - [nginx/tls.conf](./nginx/tls.conf) - - [nginx/tls-and-tor.conf](./nginx/tls-and-tor.conf) + +- [nginx/http.conf](./nginx/http.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 diff --git a/contrib/nsite.service b/contrib/nsite.service index 03e0bbf..82beb8e 100644 --- a/contrib/nsite.service +++ b/contrib/nsite.service @@ -4,7 +4,7 @@ After=network.target [Service] Type=simple -WorkingDirectory=//nsite-ts +WorkingDirectory=//nsite-gateway ExecStart=/usr/bin/node . Restart=always RestartSec=10 diff --git a/docker-compose.yml b/docker-compose.yml index 219a8db..187822e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.7" services: nsite: build: . - image: ghcr.io/hzrd149/nsite-ts:master + image: ghcr.io/hzrd149/nsite-gateway:master environment: LOOKUP_RELAYS: wss://user.kindpag.es,wss://purplepag.es SUBSCRIPTION_RELAYS: wss://nostrue.com/,wss://nos.lol/,wss://relay.damus.io/,wss://purplerelay.com/ diff --git a/package.json b/package.json index 72b447d..5d467b6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "nsite-ts", + "name": "nsite-gateway", "version": "0.6.1", "description": "A blossom server implementation written in Typescript", "main": "build/index.js", diff --git a/public/index.html b/public/index.html index 89e0726..c4a2aa8 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - Welcome to nsite-ts + Welcome to nsite-gateway