first commit

This commit is contained in:
2024-12-06 05:52:08 -05:00
commit c03877d469
20 changed files with 688 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Base image
FROM ubuntu:latest
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages and npm
RUN apt-get update && \
apt-get install -y curl build-essential && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
npm install -g holesail && npm i pm2 -g \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy the PM2 setup script
COPY pm2-setup.sh /usr/local/bin/pm2-setup.sh
RUN chmod +x /usr/local/bin/pm2-setup.sh
# Run the PM2 setup script
CMD ["/usr/local/bin/pm2-setup.sh"]

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Define connection strings and ports
declare -A connections
connections=(
["8d4637169e8c7a86fd6cbfe5447af3c36746acf8f30e6c0717e7c04df8d4e1a3cf5e36dac34304f278aaed127169fa291075758aca7ddd001cbed444cd2b0f697a"]=8001
["42f6766a67ad90a4743fed463e8eac8b9009f6904dc45444b6ae71340eac978a694b84b20d7bf20fa69039216ca35fd8b0ae1a60afc11f5069418f2c8dc7d8490f"]=8002
["8a04374263b622a53002e6043bc0347095e717d2e9b39e39ce2646a9d84a2e13d0b3c125faf008586104aa5e622f6b7c2d5d4dddef5afb63fd0240f13c72308da5"]=8003
["8771ce498444a9dc50f27893ee3aaca4ea97c62662515ba510224306b1adeeeec7c91133f055d574a42c82e98d5225edbd408258f46d28c53a6856aa94bb0d5b36"]=8004
)
# Launch PM2 processes
for connection in "${!connections[@]}"; do
port=${connections[$connection]}
pm2 start holesail --name "holesail-$port" -- "$connection" --host 0.0.0.0 --port "$port"
done
# Keep the container running
pm2-runtime start all