Added more context to Nginx config.

This commit is contained in:
2025-04-07 12:58:18 +03:00
parent a1c2f382d0
commit 19be56db11

View File

@@ -13,6 +13,7 @@ This repository includes:
### Table of Content: ### Table of Content:
- [Capital Index Database Middleware](#capital-index-database-middleware) - [Capital Index Database Middleware](#capital-index-database-middleware)
- [Overview](#overview) - [Overview](#overview)
- [About This Project](#about-this-project) - [About This Project](#about-this-project)
@@ -31,7 +32,11 @@ This repository includes:
- [Using the `test_setup` command:](#using-the-test_setup-command) - [Using the `test_setup` command:](#using-the-test_setup-command)
- [Run it and make it available to use](#run-it-and-make-it-available-to-use) - [Run it and make it available to use](#run-it-and-make-it-available-to-use)
- [Create your first admin user](#create-your-first-admin-user) - [Create your first admin user](#create-your-first-admin-user)
- [Expose the API](#expose-the-api)
- [Using Nginx](#using-nginx) - [Using Nginx](#using-nginx)
- [It should show **"Ok"**](#it-should-show-ok)
## Getting Started ## Getting Started
@@ -220,8 +225,6 @@ Config file loaded successfully.
+-------------------------------------------+ +-------------------------------------------+
``` ```
## Run it and make it available to use ## Run it and make it available to use
First make sure it is running by calling the `db-middleware start` command. First make sure it is running by calling the `db-middleware start` command.
@@ -249,6 +252,16 @@ Enter role (admin/user): admin
You don't need passwords for this, just the username and role. You don't need passwords for this, just the username and role.
### Expose the API
This app currently runs on your local network only, we need to expose it so the data consumer on the Data Analysis product can access it and consume the data it provides.
> **IMPORTANT:** You must implement TLS encryption, we will never use a non-encrypted connection to transfer your data!
You can use a dedicated domain, or a sub-domain of yours.
You can use any reverse proxy you prefer, we will guide you through Nginx and Apache.
#### Using Nginx #### Using Nginx
Nginx is a great reverse-proxy that supports connection polling and real-time connections like Webhook and Server Site Events. Nginx is a great reverse-proxy that supports connection polling and real-time connections like Webhook and Server Site Events.
@@ -259,7 +272,6 @@ Nginx is a great reverse-proxy that supports connection polling and real-time co
2. Create the config file: 2. Create the config file:
Create a config file in a path like this:
`/etc/nginx/sites-available/your_domain_com.conf` `/etc/nginx/sites-available/your_domain_com.conf`
```bash ```bash
@@ -339,9 +351,7 @@ sudo certbot renew --dry-run
> Notice the **s** in http**s** > Notice the **s** in http**s**
It should show **"Ok"** It should show **"Ok"**
--- ---
For further assistance, refer to the project documentation or open an issue in the repository. For further assistance, refer to the project documentation or open an issue in the repository.