-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathubuntu-setup.sh
38 lines (28 loc) · 1.05 KB
/
ubuntu-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Uruchom skrypt jako root (np. poprzez sudo)."
exit
fi
apt-get update -y
apt-get install -y git npm ca-certificates curl gnupg nano iputils-ping ufw
ufw enable
ufw allow 8080/tcp
ufw allow 80/tcp
ufw allow 5000/tcp
ufw reload
apt install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose
git clone https://github.com/LeftarCode/sekurak-academy-python-hacking.git
chown -R $SUDO_USER:$SUDO_USER sekurak-academy-python-hacking
cd ./sekurak-academy-python-hacking
chmod +x run.sh
cd ./react-frontend
npm install
npm run build