Update deployment to single node swarm
This commit is contained in:
parent
3502dcfcb0
commit
58e688b83e
7 changed files with 97 additions and 51 deletions
29
infrastructure/init.sh
Normal file
29
infrastructure/init.sh
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo Configuring iptables
|
||||
echo Start state
|
||||
iptables -L ufw-user-input
|
||||
|
||||
iptables -D ufw-user-input 4
|
||||
iptables -D ufw-user-input 4
|
||||
iptables -I ufw-user-input -p tcp --dport 22 -j ACCEPT
|
||||
iptables -I ufw-user-input -p tcp --dport 80 -j ACCEPT
|
||||
iptables -I ufw-user-input -p tcp --dport 443 -j ACCEPT
|
||||
|
||||
echo End state
|
||||
iptables -L ufw-user-input
|
||||
|
||||
echo Updating system
|
||||
apt update &&\
|
||||
apt upgrade -y &&\
|
||||
apt install zsh &&\
|
||||
sh -c "$(CHSH=yes curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
|
||||
echo Removing banner
|
||||
rm -rf /etc/update-motd.d/99-one-click
|
||||
|
||||
docker swarm init --advertise-addr eth0
|
||||
|
||||
./init-letsencrypt.sh
|
||||
|
||||
docker-compose down
|
||||
Loading…
Add table
Add a link
Reference in a new issue