-
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.
- Loading branch information
Showing
11 changed files
with
281 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"label": "Advanced Guides", | ||
"position": 3, | ||
"position": 4, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
|
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,6 @@ | ||
{ | ||
"label": "API", | ||
"position": 4, | ||
"position": 5, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
|
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,7 @@ | ||
{ | ||
"label": "External STI services", | ||
"position": 3, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
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 @@ | ||
# Configuration |
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,7 +1,195 @@ | ||
|
||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Configuration | ||
|
||
:::info | ||
This document describes the configuration file parameters for MantisTable UI. The configuration file is essential for connecting to databases, setting up external services, and customizing application behavior. | ||
|
||
## How to Use the Configuration File | ||
|
||
1. **Copy the Example File** | ||
|
||
First, make a copy of the `example.env` file. This can be done using the following command in a terminal: | ||
|
||
```sh | ||
cp example.env .env | ||
``` | ||
|
||
The `example.env` is located inside the main folder: | ||
|
||
```bash | ||
mantistable-ui | ||
├── export | ||
├── public | ||
├── src | ||
├── .gitignore | ||
├── README.md | ||
├── components.json | ||
├── docker-compose.yml | ||
├── drizzle.config.ts | ||
├── example.env | ||
. | ||
``` | ||
|
||
2. **Edit the Configuration File** | ||
|
||
Open the newly created `.env` file in a text editor of your choice. Modify the parameters as needed to fit your environment. Below is an example of how the file might look after customization: | ||
|
||
```env | ||
DATABASE_URL="postgresql://postgres:yourpassword@yourhost:5432/yourdatabase" | ||
POSTGRESQL_PASS="your_postgres_password" | ||
POSTGRES_HOST="your_postgres_host" | ||
POSTGRES_PORT="your_postgres_port" | ||
POSTGRES_DB="your_postgres_db" | ||
POSTGRES_USER="your_postgres_user" | ||
STI_HOST="http://your.sti.host:port" | ||
MONGO_INITDB_ROOT_USERNAME="your_mongo_username" | ||
MONGO_INITDB_ROOT_PASSWORD="your_mongo_password" | ||
PLUGINS_PORT="your_plugins_port" | ||
``` | ||
|
||
## Configuration Parameters | ||
|
||
### Database Configuration | ||
|
||
- **DATABASE_URL** | ||
|
||
```plaintext | ||
DATABASE_URL="postgresql://postgres:password@localhost:port/mantistableui" | ||
``` | ||
|
||
Specifies the URL for connecting to the PostgreSQL database. | ||
|
||
- **POSTGRESQL_PASS** | ||
|
||
```plaintext | ||
POSTGRESQL_PASS="password!" | ||
``` | ||
|
||
The password for the PostgreSQL database user. This should match the password specified in the `DATABASE_URL`. | ||
|
||
- **POSTGRES_HOST** | ||
|
||
```plaintext | ||
POSTGRES_HOST="localhost" | ||
``` | ||
|
||
The hostname or IP address of the PostgreSQL server. | ||
|
||
- **POSTGRES_PORT** | ||
|
||
```plaintext | ||
POSTGRES_PORT="5432" | ||
``` | ||
|
||
The port on which the PostgreSQL server is running. | ||
|
||
- **POSTGRES_DB** | ||
|
||
```plaintext | ||
POSTGRES_DB="mantistableui" | ||
``` | ||
|
||
The name of the PostgreSQL database to connect to. | ||
|
||
- **POSTGRES_USER** | ||
|
||
```plaintext | ||
POSTGRES_USER="user" | ||
``` | ||
|
||
The username for the PostgreSQL database. | ||
|
||
### External Service Configuration | ||
|
||
- **STI_HOST** | ||
|
||
```plaintext | ||
STI_HOST="http://local:5042" | ||
``` | ||
|
||
Specifies the hostname, URL or IP address for an STI service. Replace this with the appropriate URL for your setup. | ||
|
||
:::warning | ||
The external Semantic Table Interpretation service must expose APIs as indicated in [sti-api](/docs/external-sti-services/sti-api.md) | ||
::: | ||
|
||
### MongoDB Configuration | ||
|
||
- **MONGO_INITDB_ROOT_USERNAME** | ||
|
||
```plaintext | ||
MONGO_INITDB_ROOT_USERNAME="root" | ||
``` | ||
|
||
The root username for the MongoDB instance. | ||
|
||
- **MONGO_INITDB_ROOT_PASSWORD** | ||
|
||
```plaintext | ||
MONGO_INITDB_ROOT_PASSWORD="export2024!" | ||
``` | ||
|
||
The root password for the MongoDB instance. | ||
|
||
### Plugins Configuration | ||
|
||
- **PLUGINS_PORT** | ||
|
||
```plaintext | ||
PLUGINS_PORT="5001" | ||
``` | ||
|
||
The port on which the plugins service will run. | ||
|
||
### Example Environment Variables | ||
|
||
You can also define custom environment variables for additional configuration. Below are examples of how to add custom variables: | ||
|
||
- **SERVERVAR** | ||
|
||
```plaintext | ||
# SERVERVAR="foo" | ||
``` | ||
|
||
A placeholder for server-side variables. Uncomment and set a value if needed. | ||
|
||
- **NEXT_PUBLIC_CLIENTVAR** | ||
|
||
```plaintext | ||
# NEXT_PUBLIC_CLIENTVAR="bar" | ||
``` | ||
|
||
A placeholder for client-side variables. Uncomment and set a value if needed. | ||
|
||
## Configuration File Example | ||
|
||
Below is a complete example of a configuration file with all parameters: | ||
|
||
```plaintext | ||
DATABASE_URL="postgresql://postgres:password@localhost:5432/mantistable" | ||
POSTGRESQL_PASS="table_ui2024!" | ||
POSTGRES_HOST="localhost" | ||
POSTGRES_PORT="5432" | ||
POSTGRES_DB="postgrestableui" | ||
POSTGRES_USER="postgres" | ||
STI_HOST="http://vm.chronos.disco.unimib.it:5042" | ||
MONGO_INITDB_ROOT_USERNAME="root" | ||
MONGO_INITDB_ROOT_PASSWORD="export2024!" | ||
PLUGINS_PORT="5001" | ||
# Example: | ||
# SERVERVAR="foo" | ||
# NEXT_PUBLIC_CLIENTVAR="bar" | ||
``` | ||
|
||
## Conclusion | ||
|
||
Check the [**`mantistable.config.js` API reference**](/docs/api/mantistable.config.js) for an exhaustive list of options. | ||
The configuration file for MantisTable UI is crucial for ensuring proper connections to databases and external services. By correctly setting these parameters, you ensure the smooth operation and integration of MantisTable UI within your environment. If you encounter any issues, refer to the [Troubleshooting](#troubleshooting) section in the main documentation or seek assistance from the community. |
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 +1,77 @@ | ||
# Installation | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Installation | ||
|
||
This page will guide you through the installation the application using Docker. | ||
|
||
## Table of Contents | ||
|
||
1. [Prerequisites](#prerequisites) | ||
2. [Installation](#installation) | ||
- [Using Docker](#using-docker) | ||
- [Using Docker Compose](#using-docker-compose) | ||
|
||
## Prerequisites | ||
|
||
Before you begin, ensure you have the following installed on your system: | ||
|
||
- [Docker](https://docs.docker.com/get-docker/) | ||
- [Docker Compose](https://docs.docker.com/compose/install/) (for Docker Compose installation) | ||
- A modern web browser (e.g., Chrome, Firefox, Edge) | ||
|
||
## Installation | ||
|
||
### Using Docker | ||
|
||
1. **Pull the Docker Image** | ||
|
||
Open your terminal and pull the MantisTable UI Docker image from the Docker Hub: | ||
|
||
```sh | ||
docker pull mantistable/mantistable-ui:latest | ||
``` | ||
|
||
2. **Run the Docker Container** | ||
|
||
Start the Docker container using the following command: | ||
|
||
```sh | ||
docker run -d -p 8080:80 --name mantistable-ui mantistable/mantistable-ui:latest | ||
``` | ||
|
||
This command will run the MantisTable UI container in detached mode and map port 80 of the container to port 8080 on your host machine. | ||
|
||
3. **Access the Application** | ||
|
||
Open your web browser and navigate to `http://localhost:8080` to access the MantisTable UI. | ||
|
||
### Using Docker Compose | ||
|
||
1. **Create a `docker-compose.yml` File** | ||
|
||
Create a `docker-compose.yml` file in your project directory with the following content: | ||
|
||
```yaml | ||
version: '3' | ||
services: | ||
mantistable-ui: | ||
image: mantistable/mantistable-ui:latest | ||
ports: | ||
- "8080:80" | ||
``` | ||
|
||
2. **Start the Docker Compose Services** | ||
|
||
In the terminal, navigate to your project directory and run: | ||
|
||
```sh | ||
docker-compose up -d | ||
``` | ||
|
||
This command will start the MantisTable UI service in detached mode. | ||
|
||
3. **Access the Application** | ||
|
||
Open your web browser and navigate to `http://localhost:8080` to access the MantisTable UI. |
This file was deleted.
Oops, something went wrong.
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.