update docs
This commit is contained in:
parent
73bf0a90ef
commit
c608805862
2 changed files with 44 additions and 30 deletions
74
README.md
74
README.md
|
@ -1,28 +1,23 @@
|
||||||
# Cevitxe signal server
|
<img src='https://raw.githubusercontent.com/local-first-web/branding/main/svg/relay-v.svg'
|
||||||
|
width='250' alt="@localfirst/relay logo"/>
|
||||||
|
|
||||||
This is a deployment wrapper for [cevitxe-signal-server](https://github.com/DevResults/cevitxe/packages/cevitxe-signal-server).
|
This is a deployment wrapper for [@localfirst/relay](https://github.com/local-first-web/relay/packages/relay).
|
||||||
|
|
||||||
## Installing and running locally
|
Jump to instructions for:
|
||||||
|
[Glitch](#deploying-to-glitch) |
|
||||||
```bash
|
[Heroku](#deploying-to-heroku) |
|
||||||
yarn
|
[AWS](#deploying-to-aws-elastic-beanstalk) |
|
||||||
yarn start
|
[Google](#deploying-to-google-cloud) |
|
||||||
```
|
[Azure](#deploying-to-azure) |
|
||||||
|
[local deployment](#installing-and-running-locally)
|
||||||
You should see confirmation on the command line that it's running.
|
|
||||||
|
|
||||||
```
|
|
||||||
🐟 Listening at http://localhost:8080
|
|
||||||
```
|
|
||||||
|
|
||||||
You can visit that address with a web browser to confirm that it's active. If it is, you'll see this:
|
|
||||||
|
|
||||||
<img src='./cevitxe-signal-server-screenshot.png' width='500' />
|
|
||||||
|
|
||||||
## Deploying to Glitch
|
## Deploying to Glitch
|
||||||
|
|
||||||
This server can run on [Glitch](https://glitch.com). Remix the
|
You can deploy this relay to [Glitch](https://glitch.com) by clicking this button
|
||||||
[**cevitxe-signal-server**](https://glitch.com/edit/#!/cevitxe-signal-server) project.
|
|
||||||
|
[![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/import/github/local-first-web/relay-deployable)
|
||||||
|
|
||||||
|
Alternatively, you can remix the [**local-first-relay**](https://glitch.com/edit/#!/local-first-relay) project.
|
||||||
|
|
||||||
![image](https://user-images.githubusercontent.com/2136620/68673397-ef186800-0553-11ea-9840-45963ad4c18d.png)
|
![image](https://user-images.githubusercontent.com/2136620/68673397-ef186800-0553-11ea-9840-45963ad4c18d.png)
|
||||||
|
|
||||||
|
@ -30,7 +25,9 @@ This server can run on [Glitch](https://glitch.com). Remix the
|
||||||
|
|
||||||
This server can be deployed to [Heroku](https://heroku.com). By design, it should only ever run with a single dyno.
|
This server can be deployed to [Heroku](https://heroku.com). By design, it should only ever run with a single dyno.
|
||||||
|
|
||||||
> You'll need to install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
|
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
|
||||||
|
|
||||||
|
Or, you can install using the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
heroku create
|
heroku create
|
||||||
|
@ -53,7 +50,7 @@ eb open
|
||||||
> You'll need to install the [Google Cloud SDK](https://cloud.google.com/sdk/docs/).
|
> You'll need to install the [Google Cloud SDK](https://cloud.google.com/sdk/docs/).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
gcloud projects create my-signal-server --set-as-default
|
gcloud projects create my-local-first-relay --set-as-default
|
||||||
gcloud app create
|
gcloud app create
|
||||||
gcloud app deploy
|
gcloud app deploy
|
||||||
gcloud app browse
|
gcloud app browse
|
||||||
|
@ -64,17 +61,34 @@ gcloud app browse
|
||||||
> You'll need to have the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) installed.
|
> You'll need to have the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) installed.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
az group create --name my-signal-server --location eastus
|
az group create --name my-local-first-relay --location eastus
|
||||||
az configure --defaults group=cevitxe location=eastus
|
az configure --defaults group=my-local-first-relay location=eastus
|
||||||
az appservice plan create --name cevitxe --sku F1
|
az appservice plan create --name my-local-first-relay --sku F1
|
||||||
az webapp create --name cevitxe-signal-server --plan cevitxe
|
az webapp create --name my-local-first-relay --plan my-local-first-relay
|
||||||
az webapp deployment user set --user-name USERNAME --password PASSWORD
|
az webapp deployment user set --user-name USERNAME --password PASSWORD
|
||||||
az webapp deployment source config-local-git --name cevitxe-signal-server
|
az webapp deployment source config-local-git --name my-local-first-relay
|
||||||
git remote add azure https://USERNAME@cevitxe-signal-server.scm.azurewebsites.net/cevitxe-signal-server.git
|
git remote add azure https://USERNAME@my-local-first-relay.scm.azurewebsites.net/my-local-first-relay.git
|
||||||
git push azure master
|
git push azure master
|
||||||
az webapp browse --name cevitxe-signal-server
|
az webapp browse --name my-local-first-relay
|
||||||
```
|
```
|
||||||
|
|
||||||
## AWS Lambda, Azure Functions, Zeit Now, Serverless, Cloudwatch Workers, etc.
|
## Installing and running locally
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see confirmation on the command line that it's running.
|
||||||
|
|
||||||
|
```
|
||||||
|
🐟 Listening at http://localhost:8080
|
||||||
|
```
|
||||||
|
|
||||||
|
You can visit that address with a web browser to confirm that it's active. If it is, you'll see this:
|
||||||
|
|
||||||
|
<img src='./screenshot.png' width='500' align='center' />
|
||||||
|
|
||||||
|
## AWS Lambda, Azure Functions, Vercel, Serverless, Cloudwatch Workers, etc.
|
||||||
|
|
||||||
Since true serverless functions are stateless and only spun up on demand, they're not a good fit for this server, which needs to remember information about connected peers and maintain a stable websocket connection with each one.
|
Since true serverless functions are stateless and only spun up on demand, they're not a good fit for this server, which needs to remember information about connected peers and maintain a stable websocket connection with each one.
|
||||||
|
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Loading…
Reference in a new issue