2023-11-03 01:47:31 +00:00
|
|
|
Vagrant.configure("2") do |config|
|
|
|
|
config.vm.box = "debian/bookworm64"
|
|
|
|
config.vm.provision "shell", inline: <<-SHELL
|
|
|
|
set -xe
|
2023-11-03 01:49:00 +00:00
|
|
|
|
|
|
|
# Install Docker
|
|
|
|
which curl &>/dev/null || (apt-get update && apt-get install -y curl)
|
|
|
|
which docker &>/dev/null || curl -fsSL https://get.docker.com | sh
|
|
|
|
|
|
|
|
# Swarm?
|
|
|
|
[ ! "$(docker info | grep -c 'Swarm: active')" -eq 1 ] && docker swarm init
|
|
|
|
|
|
|
|
# Start Traefik compose
|
|
|
|
mkdir -p /vagrant/traefik/letsencrypt
|
2023-11-03 01:47:55 +00:00
|
|
|
cd /vagrant/traefik || exit 1
|
2023-11-03 01:47:31 +00:00
|
|
|
docker compose up -d
|
2023-11-03 01:49:00 +00:00
|
|
|
|
2023-11-03 01:47:31 +00:00
|
|
|
SHELL
|
|
|
|
end
|