Browse Source

update vagrant configs (#8706)

trevDev() 3 months ago
parent
commit
8971bb8cf2
2 changed files with 11 additions and 5 deletions
  1. 1
    1
      .env.vagrant
  2. 10
    4
      Vagrantfile

+ 1
- 1
.env.vagrant View File

@@ -1,2 +1,2 @@
1 1
 VAGRANT=true
2
-LOCAL_DOMAIN=mastodon.dev
2
+LOCAL_DOMAIN=mastodon.local

+ 10
- 4
Vagrantfile View File

@@ -85,6 +85,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
85 85
   config.vm.provider :virtualbox do |vb|
86 86
     vb.name = "mastodon"
87 87
     vb.customize ["modifyvm", :id, "--memory", "2048"]
88
+    # Increase the number of CPUs. Uncomment and adjust to
89
+    # increase performance
90
+    # vb.customize ["modifyvm", :id, "--cpus", "3"]
88 91
 
89 92
     # Disable VirtualBox DNS proxy to skip long-delay IPv6 resolutions.
90 93
     # https://github.com/mitchellh/vagrant/issues/1172
@@ -97,19 +100,22 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
97 100
 
98 101
   end
99 102
 
100
-  config.vm.hostname = "mastodon.dev"
101
-
102 103
   # This uses the vagrant-hostsupdater plugin, and lets you
103
-  # access the development site at http://mastodon.dev.
104
+  # access the development site at http://mastodon.local.
105
+  # If you change it, also change it in .env.vagrant before provisioning
106
+  # the vagrant server to update the development build.
107
+  #
104 108
   # To install:
105 109
   #   $ vagrant plugin install vagrant-hostsupdater
110
+  config.vm.hostname = "mastodon.local"
111
+
106 112
   if defined?(VagrantPlugins::HostsUpdater)
107 113
     config.vm.network :private_network, ip: "192.168.42.42", nictype: "virtio"
108 114
     config.hostsupdater.remove_on_suspend = false
109 115
   end
110 116
 
111 117
   if config.vm.networks.any? { |type, options| type == :private_network }
112
-    config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
118
+    config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp', 'actimeo=1']
113 119
   else
114 120
     config.vm.synced_folder ".", "/vagrant"
115 121
   end