mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-28 18:30:53 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			1020 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1020 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # -*- mode: ruby -*-
 | |
| # vi: set ft=ruby :
 | |
| 
 | |
| Vagrant.configure("2") do |config|
 | |
|   # Recreate our conditions
 | |
|   config.vm.box = "generic/debian10"
 | |
|   config.vm.provider "hyperv" do |v|
 | |
|     v.memory = 1024
 | |
|     v.cpus = 1
 | |
|   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
 | |
|     #export SKIP_NETWORK_CHECKS=1
 | |
| 
 | |
|     # Start the setup script.
 | |
|     cd /vagrant
 | |
|     setup/start.sh
 | |
| SH
 | |
| end
 |