This commit is contained in:
paramah 2022-11-20 14:05:28 +01:00
parent 24f41808af
commit 1cac97d013
3 changed files with 20 additions and 0 deletions

17
README.md Normal file
View File

@ -0,0 +1,17 @@
# docker swarm vagrant lab
norma
Przed `make up`:
```
touch join.sh
chmod +x join.sh
```
W pliku `join.sh` wprowadzamy komendy, które zostaną uruchomione przy starcie VPS np.
```
#/bin/sh
sudo docker swarm join --token SWMTKN-1-3ffnqvbldx49uhtbgs7icng2996x0bqmk3f9bkromd3yw57wbs-bipyb1fjs158eti7adq7nabpl 192.168.88.177:2377
```

1
Vagrantfile vendored
View File

@ -44,6 +44,7 @@ Vagrant.configure(2) do |config|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
if [ -f /vagrant/join.sh ]; then /vagrant/join.sh; else echo "/vagrant/join.sh not found!"; fi
SHELL
end
end

2
join.sh Executable file
View File

@ -0,0 +1,2 @@
#/bin/sh
sudo docker swarm join --token SWMTKN-1-3ffnqvbldx49uhtbgs7icng2996x0bqmk3f9bkromd3yw57wbs-bipyb1fjs158eti7adq7nabpl 192.168.88.177:2377