-
-
Save bsormagec/bd5cb2ed49e5b8717aebb1d0a5405423 to your computer and use it in GitHub Desktop.
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
| git clone git@git.quantox.tech:aleksandar.vasic/pantybay.git pantybay | |
| git clone https://github.com/phpmyadmin/phpmyadmin phpMyAdmin | |
| Instalirati homestead globalno ili u samom projektu: | |
| cd pantybay | |
| composer install | |
| composer require laravel/homestead | |
| dodati fajlove Vagrantfile, Homestead.yaml i after.sh | |
| U Homestead.yaml zameniti {$yourdir} sa vasom strukturom. | |
| vagrant up | |
| dodati u /etc/hosts/ | |
| 192.168.10.10 pantybay.app | |
| 192.168.10.10 phpmyadmin.app | |
| 192.168.10.10 dev.pantybay.com | |
| 192.168.10.10 modelia.dev.pantybay.com | |
| vagrant ssh | |
| cd pantybay | |
| mysql -u homestead -p | |
| > (password : secret) | |
| > CREATE USER 'panty_dev'@'localhost' IDENTIFIED BY 'sifra'; | |
| > GRANT ALL PRIVILEGES ON * . * TO 'panty_dev'@'localhost'; | |
| > FLUSH PRIVILEGES; | |
| > quit | |
| ici u phpmyadmin logovati se sa userom pantybay_dev i ubaciti bazu pantybay_dev | |
| ili | |
| mysql -u panty_dev -p panty_dev < panty_dev.sql | |
| sudo vim /etc/php/5.6/cli/conf.d/20-xdebug.ini -> iskljuciti xdebug | |
| exit | |
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
| #!/bin/sh | |
| # stop the php7 service | |
| sudo service php7.0-fpm stop | |
| # make sure we have the latest package lists | |
| sudo apt-get update | |
| # install 5.6 versions of the default homestead packages | |
| sudo apt-get install -y --force-yes php5.6-cli php5.6-fpm php5.6-dev \ | |
| php5.6-mcrypt imagemagick php5.6-imagick php5.6-gd php5.6-mbstring php5.6-mysql php5.6-pdo php5.6-pdo-mysql php5.6-curl php5.6-readline php5.6-zip php5.6-intl php5.6-bcmath php5.6-geoip | |
| sudo mkdir /usr/local/share/GeoIP | |
| cd /usr/local/share/GeoIP | |
| sudo wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
| sudo gunzip GeoLiteCity.dat.gz | |
| sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat | |
| sudo service php5.6-fpm restart | |
| # set the php symlink to point to the 5.6 version (for cli) | |
| sudo update-alternatives --set php /usr/bin/php5.6 | |
| # replace php7 socket on configured nginx sites with 5.6 | |
| grep -r -l 'php7.1-fpm' /etc/nginx/sites-enabled/* | | |
| xargs sudo sed -i 's/php7\.1-fpm/php5\.6-fpm/g' | |
| # start php5.6 | |
| sudo service php5.6-fpm start | |
| # restart nginx | |
| sudo service nginx restart | |
| cd /home/vagrant/pantybay | |
| nohup php artisan ws:run > nohup.out 2> Error.err < /dev/null & | |
| sleep 3s | |
| nohup php artisan wschat:run > nohup.out 2> Error.err < /dev/null & | |
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
| --- | |
| ip: "192.168.10.10" | |
| memory: 2048 | |
| cpus: 1 | |
| hostname: pantybay | |
| name: pantybay | |
| provider: virtualbox | |
| authorize: ~/.ssh/id_rsa.pub | |
| keys: | |
| - ~/.ssh/id_rsa | |
| folders: | |
| - map: "{$yourdir}/pantybay" | |
| to: "/home/vagrant/pantybay" | |
| - map: "{$yourdir}/phpMyAdmin" | |
| to: "/home/vagrant/phpMyAdmin" | |
| sites: | |
| - map: pantybay.app | |
| to: "/home/vagrant/pantybay/public" | |
| - map: phpmyadmin.app | |
| to: "/home/vagrant/phpMyAdmin" | |
| databases: | |
| - panty_dev |
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 : | |
| require 'json' | |
| require 'yaml' | |
| VAGRANTFILE_API_VERSION ||= "2" | |
| confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__)) | |
| homesteadYamlPath = "Homestead.yaml" | |
| homesteadJsonPath = "Homestead.json" | |
| afterScriptPath = "after.sh" | |
| aliasesPath = "aliases" | |
| require File.expand_path(confDir + '/scripts/homestead.rb') | |
| Vagrant.require_version '>= 1.8.4' | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| if File.exist? aliasesPath then | |
| config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases" | |
| config.vm.provision "shell" do |s| | |
| s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases" | |
| end | |
| end | |
| if File.exist? homesteadYamlPath then | |
| settings = YAML::load(File.read(homesteadYamlPath)) | |
| elsif File.exist? homesteadJsonPath then | |
| settings = JSON.parse(File.read(homesteadJsonPath)) | |
| end | |
| Homestead.configure(config, settings) | |
| if File.exist? afterScriptPath then | |
| config.vm.provision "shell", path: afterScriptPath, privileged: false | |
| end | |
| if defined? VagrantPlugins::HostsUpdater | |
| config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] } | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment