update
This commit is contained in:
112
holesail-connector/README.md
Normal file
112
holesail-connector/README.md
Normal file
@ -0,0 +1,112 @@
|
||||
# Dockerized Holesail with PM2 Orchestration
|
||||
|
||||
This project provides a pre-configured Docker container for running multiple Holesail processes orchestrated using PM2. Each process is assigned a specific connection string and port.
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
- **Ubuntu-based container**: Uses the latest `ubuntu` image as the base.
|
||||
- **Node.js v20**: Includes the latest Node.js for running Holesail.
|
||||
- **PM2 process management**: Manages multiple Holesail processes with ease.
|
||||
- **Multi-port configuration**: Runs Holesail on multiple ports with predefined connection strings.
|
||||
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Docker installed on your system.
|
||||
- Basic knowledge of Docker and PM2.
|
||||
|
||||
---
|
||||
|
||||
### Build the Docker Image
|
||||
|
||||
1. Clone this repository:
|
||||
|
||||
```bash
|
||||
git clone <repository_url>
|
||||
cd <repository_directory>
|
||||
```
|
||||
|
||||
2. Build the Docker image:
|
||||
|
||||
```bash
|
||||
docker build -t holesail-pm2 .
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Run the Container
|
||||
|
||||
Start the container:
|
||||
|
||||
```bash
|
||||
docker run -d --name holesail-pm2-container holesail-pm2
|
||||
```
|
||||
|
||||
This will:
|
||||
- Install required dependencies.
|
||||
- Start multiple Holesail processes using PM2 based on predefined connection strings and ports.
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
The `pm2-setup.sh` script defines the connection strings and ports. You can modify the `connections` array to suit your needs:
|
||||
|
||||
```bash
|
||||
declare -A connections
|
||||
connections=(
|
||||
["<connection_string_1>"]=<port_1>
|
||||
["<connection_string_2>"]=<port_2>
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Logs and Debugging
|
||||
|
||||
To view PM2 logs from the container:
|
||||
|
||||
```bash
|
||||
docker exec -it holesail-pm2-container pm2 logs
|
||||
```
|
||||
|
||||
To inspect the container:
|
||||
|
||||
```bash
|
||||
docker exec -it holesail-pm2-container bash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
.
|
||||
├── Dockerfile # Docker configuration for building the image
|
||||
├── pm2-setup.sh # PM2 setup script for launching Holesail processes
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Extending
|
||||
|
||||
To add more features:
|
||||
1. Update the `pm2-setup.sh` file with additional PM2 configurations or commands.
|
||||
2. Rebuild the Docker image:
|
||||
|
||||
```bash
|
||||
docker build -t holesail-pm2 .
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- The `pm2-runtime` command ensures the container remains active as long as PM2 processes are running.
|
||||
- Ports and connection strings must not conflict with existing services.
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define connection strings and ports
|
||||
# MAKE SURE TO CHANGE THESE TO YOUR OWN CUSTOM STRINGS!
|
||||
declare -A connections
|
||||
connections=(
|
||||
["8d4637169e8c7a86fd6cbfe5447af3c36746acf8f30e6c0717e7c04df8d4e1a3cf5e36dac34304f278aaed127169fa291075758aca7ddd001cbed444cd2b0f697a"]=8001
|
||||
|
Reference in New Issue
Block a user