- install cygwin with rsync component
- vagrant init
- vagrant up inside vagrant dir
- vagrant rsync-auto to watch files (somehow it won't autosync :/ )
- vagrant ssh
Last active
August 29, 2015 14:18
-
-
Save djaney/08571ab03b3089d61f88 to your computer and use it in GitHub Desktop.
Symfony Box
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
| #!/usr/bin/env bash | |
| sudo apt-get update | |
| # Install mysql and php | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password PASS' | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password PASS' | |
| # inatall pa more | |
| sudo apt-get install -y mysql-server | |
| sudo apt-get install -y php5-fpm | |
| sudo apt-get install -y php5-cli | |
| sudo apt-get install -y php5-curl | |
| sudo apt-get install -y php5-mysql | |
| sudo apt-get install -y php5-gd | |
| sudo apt-get install -y php5-dev | |
| sudo apt-get install -y php-pear | |
| sudo apt-get install -y curl | |
| sudo apt-get install -y git-core | |
| sudo apt-get install -y nodejs | |
| sudo apt-get install -y npm | |
| sudo apt-get install -y ruby-dev | |
| sudo apt-get install -y default-jre | |
| sudo apt-get install -y nginx | |
| #copy hostfiles | |
| sudo cp -rs /vhosts/. /etc/nginx/sites-enabled/ | |
| sudo gem install sass | |
| sudo gem install compass | |
| # xdebug - need pa e configure sa php.ini, kaopy na buhat provision :/ | |
| sudo pecl install xdebug | |
| # change temporary password to blank | |
| mysql -uroot -pPASS -e "SET PASSWORD = PASSWORD('');" | |
| # install composer | |
| curl -sS https://getcomposer.org/installer | php | |
| sudo mv composer.phar /usr/local/bin/composer | |
| # install nodejs for npm commands | |
| ln -s /usr/bin/nodejs /usr/bin/node | |
| # install bower | |
| sudo npm install -g bower | |
| # github bower fix | |
| git config --global url."https://".insteadOf git:// | |
| # phpunit | |
| wget https://phar.phpunit.de/phpunit.phar | |
| chmod +x phpunit.phar | |
| sudo mv phpunit.phar /usr/local/bin/phpunit | |
| sudo service nginx restart | |
| # pray... |
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
| Vagrant.configure(2) do |config| | |
| # cygwin directory fix | |
| ENV["VAGRANT_DETECTED_OS"] = ENV["VAGRANT_DETECTED_OS"].to_s + " cygwin" | |
| config.vm.box = "ubuntu/trusty64" | |
| # use public network, will use dhcp | |
| config.vm.network "public_network" | |
| config.vm.provision "shell", path: "provision.sh" | |
| # for easy configuration of your vhost files | |
| config.vm.synced_folder "vhosts", "/vhosts" | |
| # use rsync to mount directory, it's important to ignore those files | |
| config.vm.synced_folder "../projects/wtw/wtw", | |
| "/wtw", | |
| owner: "www-data", | |
| group: "www-data", | |
| type: "rsync", | |
| rsync__exclude: [ | |
| ".git/", | |
| "app/bootstrap.php.cache", | |
| "app/cache", | |
| "app/config/parameters.yml", | |
| "app/logs", | |
| "vendor", | |
| "web/bundles", | |
| "web/assetic", | |
| "web/js", | |
| "web/uploads", | |
| "composer.lock", | |
| "src/AppBundle/Resources/public/lib", | |
| "src/AppBundle/Resources/public/.sass-cache", | |
| "src/AppBundle/Resources/public/css", | |
| "src/AppBundle/Resources/public/config.rb", | |
| ".sass-cache", | |
| ], | |
| rsync__auto: true | |
| # memory config | |
| config.vm.provider "virtualbox" do |v| | |
| v.memory = 6144 | |
| v.cpus = 4 | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment