no-framework-tutorial/Vagrantfile

29 lines
1.3 KiB
Text
Raw Permalink Normal View History

2022-03-29 18:35:06 +00:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
2022-04-06 21:43:03 +00:00
config.vm.provider "virtualbox" do |v|
2022-05-02 06:58:41 +00:00
v.memory = 512
v.cpus = 2
2022-04-06 21:43:03 +00:00
end
config.vm.network "forwarded_port", guest: 1235, host: 1235
2022-03-29 18:35:06 +00:00
config.vm.network "forwarded_port", guest: 22, host: 2200, id: 'ssh'
2022-04-06 21:43:03 +00:00
config.vm.synced_folder "./app", "/home/vagrant/app/"
2022-03-29 18:35:06 +00:00
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
config.vm.provision "shell", inline: <<-SHELL
pacman -Syu --noconfirm
pacman -S --noconfirm php php-sqlite php-intl php-sodium php-apcu composer xdebug vim
echo '127.0.0.1 localhost' >> /etc/hosts
echo -e 'extension=pdo_sqlite\nextenstion=sqlite3\n' >> /etc/php/conf.d/tutorial.ini
echo -e 'extension=apcu\nzend_extension=opcache\n' >> /etc/php/conf.d/tutorial.ini
echo -e 'zend_extension=xdebug\nxdebug.client_host=10.0.2.2\n' >> /etc/php/conf.d/tutorial.ini
echo -e 'xdebug.client_port=9003\nxdebug.mode=debug\n' >> /etc/php/conf.d/tutorial.ini
echo -e 'zend.assertions=1\n' >> /etc/php/conf.d/tutorial.ini
2022-04-06 21:43:03 +00:00
echo -e 'opcache.enable=1\nopcache.enable_cli=1\n' >> /etc/php/conf.d/tutorial.ini
echo -e 'acp.enable=1\napc.enable_cli=1\n' >> /etc/php/conf.d/tutorial.ini
2022-05-19 21:34:22 +00:00
echo -e 'extension=intl\n' >> /etc/php/conf.d/tutorial.ini
2022-03-29 18:35:06 +00:00
SHELL
end