Skip to content

Instantly share code, notes, and snippets.

@muzfr7
Last active July 31, 2017 03:48
Show Gist options
  • Save muzfr7/232002949daecd6b43233a31eaf1fc3c to your computer and use it in GitHub Desktop.
Save muzfr7/232002949daecd6b43233a31eaf1fc3c to your computer and use it in GitHub Desktop.
Sample Vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |v|
v.name = "VM_NAME_GOES_HERE"
# v.memory = 1024
# v.cpus = 2
end
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
config.vm.network "forwarded_port", guest: 3306, host: 33060
# Share an additional folder to the guest VM. (host, guest)
# config.vm.synced_folder "host folder path", "guest vm folder path"
config.vm.synced_folder "/Users/YOUR_USER/Developer/symfony/PROJECT_ROOT_FOLDER", "/var/www/html",
:owner => 'vagrant',
:group => 'www-data',
:mount_options => ["dmode=775","fmode=666"]
# Enable provisioning with a shell script.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment