mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-18 06:37:06 +00:00
ae67409603
Addresses #3 Added support by adding parallel code wherever `$PUBLIC_IP` was used. Providing an IPv6 address is completely optional. Playing around on my IPv6-enabled mail server revealed that — before this change — mailinabox might try to use an IPv6 address as the value for `$PUBLIC_IP`, which wouldn't work out well.
31 lines
1.1 KiB
Ruby
31 lines
1.1 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "ubuntu14.04"
|
|
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
|
|
|
|
# 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"
|
|
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 and it'll take a
|
|
# subdomain on our justtesting.email domain so we can get
|
|
# started quickly.
|
|
export PUBLIC_IP=auto
|
|
export PUBLIC_IPV6=auto
|
|
export PUBLIC_HOSTNAME=auto-easy
|
|
export CSR_COUNTRY=US
|
|
|
|
# Start the setup script.
|
|
cd /vagrant
|
|
setup/start.sh
|
|
SH
|
|
end
|