Skip to content

Commit

Permalink
Change Installation
Browse files Browse the repository at this point in the history
  • Loading branch information
cremarco committed Jul 25, 2024
1 parent 2c92386 commit 1c11619
Show file tree
Hide file tree
Showing 11 changed files with 281 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/advanced-guides/_category_.json
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"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/api/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "API",
"position": 4,
"position": 5,
"link": {
"type": "generated-index"
}
Expand Down
7 changes: 7 additions & 0 deletions docs/external-sti-services/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "External STI services",
"position": 3,
"link": {
"type": "generated-index"
}
}
1 change: 1 addition & 0 deletions docs/external-sti-services/sti-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Configuration
194 changes: 191 additions & 3 deletions docs/getting-started/configuration.md
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.
78 changes: 77 additions & 1 deletion docs/getting-started/installation.md
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.
1 change: 0 additions & 1 deletion docs/getting-started/running.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ sidebar_position: 1

# Introduction

Introducing **MantisTable UI**, the ultimate **web interface** for managing **Semantic Table Interpretation (STI)** approaches. Designing a user-friendly, robust UI from scratch can be an arduous endeavor, demanding a unique blend of technical prowess, design acumen, and meticulous attention to detail. MantisTable UI was developed to alleviate this burden, providing an intuitive, ready-to-use platform tailored for STI 🙀.
Introducing **MantisTable UI**, the ultimate **web interface** for managing **Semantic Table Interpretation (STI)** approaches. Designing a user-friendly, robust UI from scratch can be an arduous endeavor, demanding a unique blend of technical prowess, design acumen, and meticulous attention to detail. MantisTable UI was developed to alleviate this burden, providing an intuitive, ready-to-use 🙀 platform tailored for STI.

MantisTable UI stands out with its **powerful and flexible plugin system**, enabling users to easily extend and customize its functionality. Whether you are a developer looking to integrate new features or a researcher aiming to adapt the tool to specific use cases, MantisTable UI offers a seamless experience 🦄, allowing for effortless expansion and personalization.

With MantisTable UI, you can focus on what truly matters—advancing your work in semantic table interpretation—while enjoying the benefits of a sophisticated, user-centric interface designed to enhance productivity and streamline your workflow 💅. Say goodbye to the complexities of UI development and embrace the efficiency and versatility of MantisTable UI.
With MantisTable UI, you can focus on what truly matters—advancing your work in Semantic table Interpretation while enjoying the benefits of a sophisticated, user-centric interface designed to enhance productivity and streamline your workflow 💅. Say goodbye to the complexities of UI development and embrace the efficiency and versatility of MantisTable UI.

This manual is designed to comprehensively walk through every aspect of setting up and using MantisTable UI, including every interface function and feature.

Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const config: Config = {

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
image: 'img/mantistable-ui-social-card.png',
navbar: {
title: 'MantisTable UI',
logo: {
Expand Down
Binary file removed static/img/docusaurus-social-card.jpg
Binary file not shown.
Binary file added static/img/mantistable-ui-social-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1c11619

Please sign in to comment.