Created
May 26, 2017 09:56
-
-
Save a-r-m-i-n/5052f51f5e28a417540173a54280e253 to your computer and use it in GitHub Desktop.
Ubuntu Xenial 64Bit Vagrant Box, for Virtual Box. Install scripts for TYPO3 8.7.
This file contains 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 : | |
# Requires to perform this first: | |
# `vagrant plugin install vagrant-winnfsd` | |
# `vagrant plugin install vagrant-bindfs` | |
# | |
# Put this Vagrantfile to in root directory of the TYPO3 extension you want to develop with | |
# and perform: `vagrant up` | |
# | |
# You'll reach the vagrant box in browser with: http://127.0.0.1:8080 | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ArminVieweg/ubuntu-xenial64-lamp" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.synced_folder ".", "/vagrant", disabled: true | |
config.vm.synced_folder ".", "/var/nfs", type: "nfs" | |
config.bindfs.bind_folder "/var/nfs", "/vagrant" | |
config.bindfs.bind_folder "/var/nfs", "/var/www/html/typo3conf/ext/orm" | |
config.bindfs.default_options = { | |
force_user: "vagrant", | |
force_group: "www-data", | |
perms: "u=rwX:g=rwX:o=rD" | |
} | |
config.vm.network "private_network", type: "dhcp" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = 4096 | |
vb.cpus = 2 | |
end | |
# Run always | |
config.vm.provision "shell", run: "always", inline: <<-SHELL | |
cd ~ | |
sudo composer self-update --no-progress | |
SHELL | |
# Run once (install DCE in /var/www/html) | |
config.vm.provision "shell", inline: <<-SHELL | |
cd /var/www/html | |
echo "{}" > composer.json | |
# Add packages to required section in composer.json | |
php -r '$f=json_decode(file_get_contents($argv[1]),true);$f["require"][$argv[2]]=$argv[3];file_put_contents($argv[1],json_encode($f,448)."\n");' composer.json "typo3/cms" "^8.7" | |
php -r '$f=json_decode(file_get_contents($argv[1]),true);$f["require"][$argv[2]]=$argv[3];file_put_contents($argv[1],json_encode($f,448)."\n");' composer.json "helhum/typo3-console" "^4.5" | |
php -r '$f=json_decode(file_get_contents($argv[1]),true);$f["require"][$argv[2]]=$argv[3];file_put_contents($argv[1],json_encode($f,448)."\n");' composer.json "doctrine/orm" "^2.5" | |
echo "Fetching TYPO3 8.7 using composer and install it with typo3_console..." | |
composer update --no-progress -n -q | |
vendor/bin/typo3cms install:setup --force --database-user-name "root" --database-user-password "" --database-host-name "localhost" --database-name "typo3" --database-port "3306" --database-socket "" --admin-user-name "admin" --admin-password "password" --site-name "EXT:orm Dev Environment" --site-setup-type "site" --use-existing-database 0 | |
vendor/bin/typo3cms cache:flush | |
# Add PSR-4 autoloading entries in composer.json | |
php -r '$f=json_decode(file_get_contents($argv[1]),true);$f["autoload"]["psr-4"][$argv[2]]=$argv[3];file_put_contents($argv[1],json_encode($f,448)."\n");' composer.json "ArminVieweg\\\\Orm\\\\" typo3conf/ext/orm/Classes/ | |
composer dump -o | |
php typo3/cli_dispatch.phpsh extbase extension:install orm | |
chmod 2775 . ./typo3conf ./typo3conf/ext | |
chown -R vagrant . | |
chgrp -R www-data . | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment