-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
60 lines (51 loc) · 2.21 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Developer: Eddy Lackmann
# Github:https://github.com/eddylackmann
# Last update: 08th Sept 2020
# Email: [email protected]
# Vagrant Configuration for Limesurvey
Vagrant.configure("2") do |config|
#Custom variable for installation
ip = "10.0.0.10"
#php setup
phpversion = "7.4"
#mysql setup
mysqlRootPass = "password"
mysqlDBName = "limesurvey"
mySqlDBUser = "limesurvey"
mySqlDBPassword = "password"
#postgres setup
postgresDB = "limesurvey"
postgresPassword = "password"
#limesurvey setup
limeSurveyBranch = "master"
#IDE KEY for Xdebug
ideKey = "VSCODE"
# Latest version of Ubuntu. Feel free to update it.
#config.vm.box = "ubuntu/bionic64" // Ubuntu 18
config.vm.box = "ubuntu/focal64"
#share webfolder
config.vm.synced_folder "./limesurvey", "/var/www", :mount_options => ["dmode=777", "fmode=666"], create:true
#copy config
config.vm.provision "file", source: "./configuration", destination: "/var/www/configuration"
#provision file (Depencies and software to install when the vagrant start for the first time)
config.vm.provision "shell", path: "provision/provision.sh" , :args => [ip, phpversion,mysqlRootPass,mysqlDBName,mySqlDBUser,mySqlDBPassword,postgresDB,postgresPassword,limeSurveyBranch,ideKey]
#custom port mapping
#config.vm.network "forwarded_port", guest: 80, host: 80 webserver localhost
#config.vm.network "forwarded_port", guest: 3306, host: 3306 mysql
#config.vm.network "forwarded_port", guest: 5432, host: 5432 postgres
# This IP is reachable only from your computer, not from local network.
config.vm.network "private_network", ip: ip
config.vm.hostname = "LimeSurvey"
# Needed for Windows 10 host, so ubuntu package are reachable and we can install the VirtualBox Guest Additions
config.vm.provider "virtualbox" do |vb|
vb.name = "Limesurvey"
vb.memory = 2096
vb.cpus = 2
#create serial port / Needed for ubuntu 20.04
vb.customize [ "modifyvm", :id, "--uartmode1", "file", File::NULL ]
#enable this line on windows machine (Optional).
#vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end