Last active
December 15, 2015 08:29
-
-
Save JoshuaEstes/5230868 to your computer and use it in GitHub Desktop.
Vagrantfile for symfony2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec { "apt-update": | |
command => "/usr/bin/apt-get update", | |
} | |
#### | |
# | |
# Dependencies | |
# | |
$dependencies = [ | |
"php5", | |
"php5-cli", | |
"php-apc", | |
"php5-curl", | |
"php5-sqlite", | |
"php5-intl", | |
"php5-mcrypt", | |
"php5-imagick", | |
"php5-xdebug", | |
"git", | |
"vim", | |
"sendmail", | |
] | |
package { $dependencies: | |
ensure => present, | |
require => Exec['apt-update'], | |
} | |
#### EOF: Dependencies #### | |
file { "/var/www/app.local": | |
ensure => "directory", | |
#owner => "www-data", | |
#group => "www-data", | |
#mode => "0775", | |
recurse => true, | |
} | |
class { "apache": } | |
class { "apache::mod::php": } | |
apache::vhost { "app.local": | |
priority => 000, | |
port => 80, | |
docroot => "/var/www/app.local/web", | |
ssl => false, | |
servername => "app.local", | |
options => ["FollowSymlinks MultiViews"], | |
override => ["All"], | |
ensure => present, | |
require => File['/var/www/app.local'] | |
} | |
class { "mysql": } | |
class { "mysql::php": } | |
class {"mysql::server": | |
config_hash => { | |
"root_password" => "root" | |
} | |
} | |
mysql::db { 'symfony': | |
user => 'symfony', | |
password => 'symfony', | |
host => 'localhost', | |
grant => ['all'], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :forwarded_port, guest: 80, host: 8080 | |
config.vm.network :private_network, ip: "192.168.33.10" | |
config.vm.synced_folder ".", "/var/www/app.local", :nfs => true | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "1024"] | |
end | |
config.vm.provision :puppet do |puppet| | |
puppet.options = "--verbose --debug" | |
puppet.manifests_path = "app/Resources/puppet/manifests" | |
puppet.manifest_file = "base.pp" | |
puppet.module_path = "app/Resources/puppet/modules" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment