-
Notifications
You must be signed in to change notification settings - Fork 0
vagrant.sndcomp
Note that this is only available on the vagrant branch.
The vagrant.sndcomp directory provides setup data for Vagrant that make it possible
to demo the soundcomparisons website from a local machine independant of the installed operating system.
While Linux users may directly use the docker setup,
other setups may use Vagrant to get similar functionality.
The setup is described for Windows below, but works similar for other systems.
To get the soundcomparisons website running under windows, it is necessary to get the following software installed and follow the provided setup steps:
-
Get a git client and clone the lingdb/container repository.
- A good choice for a git client under Windows or MacOS is GitHub Desktop, which is provided for free. The client has a nice, clean GUI and is specialized for GitHub.
- When cloning the repository it makes sense to use a toplevel directory on your machine,
because the sound files necessary for the soundcomparisons website can have rather long paths,
and Windows limits paths to a length of
260symbols.
-
Copy the sound files into the
nginx/soundfolder in the project directory. -
Obtain a recent database dump for the soundcomparisons website, and place it in the project directory under
mariadb/createmaking sure it's nameddump.sql. -
Obtain a
client_secrets.jsonfile as described for the lingdb/sndcomp container and place it in thesndcompdirectory. -
Download and install VirtualBox. VirtualBox will be used together with Vagrant to provide a virtual machine that will provide the website.
-
Download and install Vagrant. Vagrant is the tool that will allow us to setup and start the virtual machine in VirtualBox.
-
Perform
vagrant upin thevagrant.sndcompfolder of the project directory. This step builds the virtual machine if necessary and starts it, so it can also be used to start the virtual machine after rebooting. -
Open a browser and visit
http://localhost:8080. The website should load and work now.
To perform updates on the windows setup, it may be necessary to rebuild the Vagrant container. This makes it possible for the setup to be changed in several places and thus provides enough free room for further development of the setup. Updating is currently only manual, and the following steps are involved:
- Updating sound files is done by just placing the sound files inside the
nginx/sounddirectory. - Updating the database is done by placing the
dump.sqlinside themariadb/createfolder and running stopping/restarting the virtual machine. Stopping and starting can be done via the commandsvagrant haltandvagrant up. - Updating the rest of the setup and/or the soundcomparisons website is done by using the git client to update the copy of the container repository
and rebuilding the Vagrant container afterwards.
Rebuilding is done by issuing
vagrant halt,vagrant destroyandvagrant upin sequence.