testing/Vagrantfile

20 lines
537 B
Ruby

Vagrant.configure("2") do |config|
config.vm.box = "debian/bookworm64"
config.vm.provision "shell", inline: <<-SHELL
set -xe
# 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
cd /vagrant/traefik || exit 1
docker compose up -d
SHELL
end