power-mailinabox/Vagrantfile

31 lines
1 KiB
Text
Raw Normal View History

2020-07-08 18:31:35 +00:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
2020-07-15 14:28:47 +00:00
config.vm.box = "ubuntu/focal64"
2020-07-08 18:31:35 +00:00
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", 1, "--memory", 1024]
2020-04-11 18:12:40 +00:00
end
# Network config: Since it's a mail server, the machine must be connected
# to the public web. However, we currently don't want to expose SSH since
# the machine's box will let anyone log into it. So instead we'll put the
# machine on a private network.
config.vm.hostname = "mailinabox.lan"
config.vm.network "private_network", ip: "192.168.50.4"
config.vm.provision :shell, :inline => <<-SH
# Set environment variables so that the setup script does
# not ask any questions during provisioning. We'll let the
# machine figure out its own public IP.
export NONINTERACTIVE=1
export PUBLIC_IP=auto
export PUBLIC_IPV6=auto
export PRIMARY_HOSTNAME=auto
2020-07-08 18:31:35 +00:00
export SKIP_NETWORK_CHECKS=1
# Start the setup script.
2020-07-08 18:31:35 +00:00
cd /vagrant
setup/start.sh
SH
2020-07-08 18:31:35 +00:00
end