This repository has been archived by the owner on May 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
51 lines (40 loc) · 1.71 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/xenial64"
# Create a forwarded port mapping which allows access to a specific port
# via 127.0.0.1 to disable public access
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 80, host: 80, host_ip: "192.168.33.10"
config.vm.network "forwarded_port", guest: 443, host: 443, host_ip: "192.168.33.10"
config.vm.network "forwarded_port", guest: 3306, host: 3306
end
# argument is a set of non-required options.
config.vbguest.auto_update = true
config.nfs.map_uid = Process.uid
config.nfs.map_gid = Process.gid
config.vm.synced_folder "./www", "/var/www",
create: true,
nfs: true,
nfs_version: 4,
nfs_udp: false,
linux__nfs_options: ['rw','no_subtree_check','all_squash','async'],
bsd__nfs_options: ['async', '-alldirs', '-mapall=501:20']
config.vm.synced_folder "./shell", "/vagrant", nfs: true
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "virtualbox" do |v|
v.name = "lamp.php7"
v.memory = 1536
v.cpus = 2
end
system("/bin/bash ./shell/host.sh #{ARGV[0]}")
# View the documentation for the provider you are using for more
# information on available options.
config.vm.provision "shell", path: "shell/provision.sh"
config.vm.provision "shell", path: "shell/up.sh", run: "always"
end