script to deploy on cloud (tested on DO)

reverse-proxy
Fabien Benetou 2 years ago
parent 3a3a682769
commit 5c3b7063d3
  1. 16
      cloudinit

@ -0,0 +1,16 @@
#!/bin/bash
cd /root
curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
source nodesource_setup.sh
apt install -y nodejs
apt update && apt install -y git
git clone https://git.benetou.fr/utopiah/offline-octopus
mkdir Prototypes
mv offline-octopus/ Prototypes/
cd Prototypes/offline-octopus/
npm i express
openssl req -nodes -new -x509 -keyout naf-key.pem -out naf.pem -subj "/C=BE/ST=Brussels/L=Brussels/O=Global Security/OU=IT Department/CN=offtopus.benetou.fr"
touch /root/.ssh/id_rsa_offlineoctopus.pub
touch /root/Prototypes/offline-octopus/.keyfrommd5
HOME=/root /usr/bin/node index.js &>> log.txt
Loading…
Cancel
Save