This repo contains scripts that are used to build the Holy Unblocker frontend and deploy backend code across 4 different servers.
Contributions are not being accepted at this time. Sorry.
This guide assumes you have root.
This is ran on the master server and on each edge server
-
install dependencies
sudo apt install git nginx rsync
-
delete the default config
rm /etc/nginx/sites-enabled/default
-
install stub config
echo "include /root/domains.conf;" > /etc/nginx/sites-enabled/domains.conf
-
Install NodeJS
You need at least NodeJS v17 to deploy Holy Unblocker.
We recommend installing from NodeSource, or using Node Version Manager to install the latest version.
Most distros usually have very outdated versions of NodeJS.
Verify you're using NodeJS v17 or higher:
node -v
-
Install PM2
-
setup the HU user
adduser hu
-
Install Rust nightly
-
Setup the master HU user
su hu cd /home/hu/ git clone https://github.com/holywebwork/website2.git git clone https://github.com/holywebwork/lander.git git clone https://github.com/MercuryWorkshop/epoxy-tls cd epoxy-tls/server cargo b -r exit
-
Checkout the repo
git clone https://github.com/holywebwork/hu-util.git cd hu-util
-
Setup your configs
Use a text editor like
nano
orvim
to open these files.- domains.txt - contains a list of domains
domain1.com domain2.com domain3.com
- servers.txt - contains a list of edge server addresses
my-server-a my-server-b my-server-c 1.1.1.1 1.2.3.4
-
Configure SSH
You will need to generate a key on your master server and install the public key in each edge server.
You can create custom hosts with configs in your
~/.ssh/config
Host hu-chicago User root HostName 1.1.1.1 IdentityFile ~/.ssh/id_rsa
-
Run the scripts
This will either work, or it will go horribly wrong.
./copy.sh ./update.sh