2022-09-02 23:58:55 +00:00
|
|
|
apt -y update
|
|
|
|
apt -y upgrade
|
2022-12-21 16:59:16 +00:00
|
|
|
apt -y install git redis-server python3-pip ffmpeg tmux nginx snapd ufw gpg-agent htop nano
|
2022-09-02 23:58:55 +00:00
|
|
|
|
2022-05-25 01:46:41 +00:00
|
|
|
git config --global credential.helper store
|
2022-10-04 19:35:02 +00:00
|
|
|
cd /rDrama
|
2022-10-21 11:33:53 +00:00
|
|
|
git config branch.frost.rebase true
|
2022-12-02 22:21:18 +00:00
|
|
|
cp ./env ./.env
|
|
|
|
. ./.env
|
2022-06-10 13:44:52 +00:00
|
|
|
|
2022-10-02 08:13:49 +00:00
|
|
|
mkdir /scripts
|
|
|
|
cp ./startup.sh /scripts/s
|
|
|
|
cp ./startup_chat.sh /scripts/s2
|
|
|
|
chmod +x /scripts/*
|
2022-07-17 17:22:43 +00:00
|
|
|
|
2022-11-27 22:53:37 +00:00
|
|
|
sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
2022-05-24 15:54:52 +00:00
|
|
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
|
|
apt -y update
|
|
|
|
apt -y install postgresql-14
|
2022-10-04 19:52:15 +00:00
|
|
|
rm /etc/postgresql/14/main/pg_hba.conf
|
|
|
|
cp pg_hba.conf /etc/postgresql/14/main/pg_hba.conf
|
2022-05-03 23:39:39 +00:00
|
|
|
service postgresql restart
|
2022-05-25 02:18:04 +00:00
|
|
|
chown postgres:postgres /etc/postgresql/14/main/pg_hba.conf
|
2022-05-24 15:54:52 +00:00
|
|
|
|
2022-10-04 19:52:15 +00:00
|
|
|
rm /etc/nginx/sites-available -r
|
|
|
|
rm /etc/nginx/sites-enabled/default
|
|
|
|
mkdir /etc/nginx/includes
|
|
|
|
cp nginx.conf /etc/nginx/sites-enabled/1
|
|
|
|
cp nginx-serve-static.conf /etc/nginx/includes/serve-static
|
2022-12-12 07:44:13 +00:00
|
|
|
cp nginx-headers.conf /etc/nginx/includes/headers
|
2022-10-04 19:48:52 +00:00
|
|
|
/etc/init.d/nginx reload
|
2022-09-02 23:58:55 +00:00
|
|
|
|
2022-07-09 11:14:21 +00:00
|
|
|
psql -U postgres -f schema.sql postgres
|
|
|
|
psql -U postgres -f seed-db.sql postgres
|
2022-05-03 23:39:39 +00:00
|
|
|
pip3 install -r requirements.txt
|
2022-09-10 11:12:03 +00:00
|
|
|
|
2022-09-24 03:49:40 +00:00
|
|
|
apt -y install curl
|
|
|
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
2022-11-30 18:38:55 +00:00
|
|
|
. "$NVM_DIRECTORY/nvm.sh" && nvm install ${NODE_VERSION}
|
|
|
|
. "$NVM_DIRECTORY/nvm.sh" && nvm use v${NODE_VERSION}
|
|
|
|
. "$NVM_DIRECTORY/nvm.sh" && nvm alias default v${NODE_VERSION}
|
2022-09-24 03:49:40 +00:00
|
|
|
PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
npm i -g yarn
|
|
|
|
|
2022-02-05 09:36:34 +00:00
|
|
|
mkdir /images
|
2022-09-10 11:12:03 +00:00
|
|
|
mkdir /songs
|
2022-05-22 16:13:19 +00:00
|
|
|
mkdir /videos
|
2022-05-22 22:15:29 +00:00
|
|
|
mkdir /audio
|
2022-09-09 09:13:50 +00:00
|
|
|
mkdir /asset_submissions
|
2022-09-10 11:12:03 +00:00
|
|
|
mkdir /asset_submissions/marseys
|
|
|
|
mkdir /asset_submissions/hats
|
2022-09-12 07:06:50 +00:00
|
|
|
mkdir /asset_submissions/marseys/original
|
|
|
|
mkdir /asset_submissions/hats/original
|
2022-11-30 18:09:31 +00:00
|
|
|
mkdir /var/log/rdrama
|
|
|
|
|
|
|
|
chown rdrama:rdrama /var/log/rdrama
|
2022-09-10 11:12:03 +00:00
|
|
|
|
2022-05-27 22:58:01 +00:00
|
|
|
git config --global --add safe.directory /songs
|
|
|
|
git config --global --add safe.directory /images
|
|
|
|
git config --global --add safe.directory /videos
|
|
|
|
git config --global --add safe.directory /audio
|
2022-12-09 15:14:13 +00:00
|
|
|
|
2022-04-19 19:05:00 +00:00
|
|
|
snap install opera-proxy
|
2022-12-09 15:14:13 +00:00
|
|
|
|
2022-04-16 20:11:19 +00:00
|
|
|
ufw allow ssh
|
|
|
|
ufw allow from 173.245.48.0/20
|
|
|
|
ufw allow from 103.21.244.0/22
|
|
|
|
ufw allow from 103.22.200.0/22
|
|
|
|
ufw allow from 103.31.4.0/22
|
|
|
|
ufw allow from 141.101.64.0/18
|
|
|
|
ufw allow from 108.162.192.0/18
|
|
|
|
ufw allow from 190.93.240.0/20
|
|
|
|
ufw allow from 188.114.96.0/20
|
|
|
|
ufw allow from 197.234.240.0/22
|
|
|
|
ufw allow from 198.41.128.0/17
|
|
|
|
ufw allow from 162.158.0.0/15
|
|
|
|
ufw allow from 104.16.0.0/13
|
|
|
|
ufw allow from 104.24.0.0/14
|
|
|
|
ufw allow from 172.64.0.0/13
|
2022-04-16 20:11:29 +00:00
|
|
|
ufw allow from 131.0.72.0/22
|
2022-04-25 15:48:36 +00:00
|
|
|
echo "y" | ufw enable
|
2022-12-09 15:14:13 +00:00
|
|
|
|
2022-05-21 15:35:50 +00:00
|
|
|
curl https://rclone.org/install.sh | bash
|
2022-07-29 22:19:55 +00:00
|
|
|
echo "psql -U postgres" > /p
|
2022-09-02 23:58:55 +00:00
|
|
|
echo "tmux -S /tmp/s a -t 0" > /c
|
|
|
|
echo "tmux -S /tmp/s a -t 1" > /c2
|
2022-07-29 22:19:55 +00:00
|
|
|
echo "cd /rDrama && git pull" > /g
|
2022-10-13 18:21:02 +00:00
|
|
|
|
|
|
|
cd ./chat
|
|
|
|
yarn install
|
|
|
|
yarn chat
|
|
|
|
cd ..
|
2022-12-17 16:05:08 +00:00
|
|
|
|
|
|
|
. imei.sh
|