-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #410 from wuespace/TELESTION-472
TELESTION-472 Update documentation and remove unused references
- Loading branch information
Showing
21 changed files
with
252 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
nav: | ||
- index.md | ||
- typescript | ||
- rust | ||
- other-languages.md | ||
- Service Behavior Specification: service-behavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Samples | ||
|
||
You can find even more samples in the project's GitHub repository under `backend-deno/samples`: | ||
|
||
[Browse samples on GitHub](https://github.com/wuespace/telestion/tree/main/backend-deno/samples){ .md-button } | ||
|
||
## Running the samples | ||
|
||
You can run all the samples using the `docker-compose.yml` file in the linked folder. Just run the following command: | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
This will run all the samples, including the required NATS server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# Docker Deployment | ||
|
||
This document describes how to deploy Telestion using Docker. | ||
|
||
## Guidelines | ||
|
||
These guidelines are not strict rules, but they are recommended to follow. If you have a good reason to deviate from them, feel free to do so. Or in other words: If you don't know why you should deviate from them, don't do it. | ||
|
||
### Images per Service Type | ||
|
||
Depending on your project, it might make sense to have individual images for each service. However, for smaller projects, this is often both unnecessary and cumbersome. In this case, it is recommended to have one image for all services of a specific type. | ||
|
||
For example, you would have one image for all Deno based Backend services, one for the frontend, and so on. This way, you won't have to build and push huge numbers of images, and you can still use the same image for all services of a specific type. | ||
|
||
### Dependency Installation at Build Time | ||
|
||
If you have a service that requires dependencies to be installed, it is recommended to do so at build time. This way, you can be sure that the dependencies are installed when the image is built, and you don't have to wait for them to be installed when the container is started. | ||
|
||
This ensures both a faster startup time and a consistent execution environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,51 @@ | ||
# NATS Server Configuration | ||
|
||
The NATS server can be configured using both a configuration file and environment variables. | ||
|
||
## Environment Variables | ||
|
||
The NATS server configuration is done via environment variables. The following table lists all available environment variables and their default values. | ||
|
||
| Environment Variable | Default Value | Description | | ||
|----------------------|---------------|------------------------------| | ||
| `NATS_HOST` | `localhost` | The host of the NATS server. | | ||
| `NATS_PORT` | `4222` | The port of the NATS server. | | ||
|
||
## Configuration File | ||
|
||
The NATS server can also be configured using a configuration file. To use a configuration file, you need to pass the `-c` flag to the NATS server: | ||
|
||
```bash | ||
nats-server -c <path-to-config-file> | ||
``` | ||
|
||
You can find a full reference of the NATS server configuration in the [NATS documentation](https://docs.nats.io/nats-server/configuration). | ||
|
||
For Telestion, the following settings are of special interest: | ||
|
||
1. [`websocket`](https://docs.nats.io/running-a-nats-service/configuration/websocket/websocket_conf) - This section configures the WebSocket interface of the NATS server. It's used by the Telestion frontend to connect to the NATS server. | ||
2. [`authorization`](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/authorization) - This section configures who can publish and subscribe to which subjects. | ||
3. [`authorization.users`](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/username_password) - This section configures the user accounts that can connect to the NATS server. It's used to configure the user accounts that can connect to the NATS server. As of right now, Telestion exclusively supports [username/password-based authentication](https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/username_password). | ||
|
||
### Development Configuration | ||
|
||
The following configuration is a good starting point for development. | ||
|
||
!!! danger | ||
**Do not use this configuration in production!** It's only meant for development. | ||
|
||
There are several problems with this configuration that make it unsuitable for production: | ||
|
||
1. it doesn't use TLS for the websocket interface, meaning that all communication is unencrypted | ||
2. it doesn't have any authentication or authorization configured, meaning that anyone can connect to the NATS server and publish/subscribe to any subject | ||
|
||
**In essence, if you were to use this configuration in production, you would have a NATS server that is publicly accessible and allows anyone with access to your server to publish/subscribe to any subject!** | ||
|
||
```json title="nats.conf" | ||
http_port: 8222 | ||
|
||
websocket: { | ||
port: 9222 | ||
no_tls: true | ||
} | ||
``` |
Oops, something went wrong.