GITBOOK-69: No subject

This commit is contained in:
Mohamed Marrouchi
2024-10-02 16:25:24 +00:00
committed by gitbook-bot
parent 6d299c120f
commit 8283d89cc1

View File

@@ -15,11 +15,20 @@ To ensure Hexabot runs smoothly, you'll need the following:
$ git clone https://github.com/hexastack/hexabot.git
```
2. **Environment Setup:** \
To configure the environment variables, use the Makefile at the root folder for initialization:
2. **Installation:**
Install node dependencies:
```
$ make init
$ git clone https://github.com/hexastack/hexabot.git
```
2. **Environment Setup:** 
To configure the environment variables, use the Makefile at the root folder for initialization:
```
$ npx hexabot init
```
This will copy the `.env.example` file to `.env` in the `./docker` directory if the file does not already exist.
@@ -27,7 +36,7 @@ This will copy the `.env.example` file to `.env` in the `./docker` directory if
3. **Running the Application in development mode:** Once your environment is set up, you can start the app. Use either of the following commands:
```
$ make dev
$ npx hexabot dev
```
**Note:** The first time you run the app, Docker will take some time to build all the required Docker images cache the layers.
@@ -45,15 +54,14 @@ Live Chat Widget is accessible via [http://localhost:5173](http://localhost:5173
### Useful Commands
* `make init` : Copies the .env.example file to .env in the ./docker directory if .env does not exist. This is usually used for initial setup.
* `make dev` : Builds the Docker images locally before starting the services in development mode. It first checks the .env file for completeness against .env.example.
* `make start` : Starts the app by pulling the Docker images from Docker Hub. This target also checks the .env file for required variables.
* `make stop` : Stops all running Docker services defined in the compose files.
* `make destroy` : Stops all services and removes all volumes associated with the Docker compose setup, ensuring a clean state.
* `make check-env` : Checks if the ./docker/.env file exists and contains all the necessary environment variables as defined in ./docker/.env.example. If the file does not exist, it is created from the example. It also lists missing variables if any.
* `npx hexabot init` : Copies the .env.example file to .env in the ./docker directory if .env does not exist. This is usually used for initial setup.
* `npx hexabot dev` : Builds the Docker images locally before starting the services in development mode. It first checks the .env file for completeness against .env.example.
* `npx hexabot start` : Starts the app by pulling the Docker images from Docker Hub. This target also checks the .env file for required variables.
* `npx hexabot stop` : Stops all running Docker services defined in the compose files.
* `npx hexabot destroy` : Stops all services and removes all volumes associated with the Docker compose setup, ensuring a clean state.
Example on how to start the stack by adding the Nginx service :
```
make start NGINX=1
npx hexabot start --enable=nginx
```