This repository contains all the needed instructions to get a development environment up and running on any computer or OS. The only requirements are VirtualBox and Vagrant.
This is made possible with a virtual machine. This one contains the instructions for setting up and downloading the required software for a setting up a development environment for a Vulcan.js project.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Make sure VirtualBox and Vagrant are installed. If they aren't installed yet, it's quite easy to get done by going to their websites and following the instructions for your OS.
- 6GB of RAM - This is due to the needs of the development server.
Open a terminal and make a new project folder, then download this repository:
mkdir vulcan-project && cd vulcan-project
git clone https://github.com/MathiasKandelborg/automated-vulcan-setup.git .
Now it's time to setup the VM. This generally takes some time as you computer is downloading, installing and running an entire OS, in your current OS.
vagrant up
When the installation processes are done, proceed to access the newly created VM with this command:
vagrant ssh
You are now in an Ubuntu v18.04 env with all the required software installed for running a Vulcan.js project.
Run the following commands right after vagrant ssh
:
Press (y) on all choices for the fastest installation of Vulcan.js
cd app
./scripts/download-vulcan.sh
This takes some time as we're now downloading the Vulcan Core & Starter repositories and are running npm install
in both.
Just one last thing before we start our development server: Since this is a 'clean' install, we need to make sure the Vulcan Core packages are used. We do this by defining an ENV variable in our projects start script. Just run the following commands and everything will be ready!
cd Starter
sed -i -e '/^ "start": "meteor --settings settings.json",/s/^.*$/ "start": "METEOR_PACKAGE_DIRS=\\\"\/home\/vagrant\/app\/Core\/packages\\\" meteor --settings settings.json",/' package.json
Start the development server
npm start
When it's ready, your dev environment is all set up and localhost:3000
is available and showing the current state of your project.
If you've never tried Vulcan.js, it is recommended to follow the built-in tutorials to get a grip of how things work. After starting the project with
npm install
, you can simply go tolocalhost:3000
and start following along.
You can access your application from the app
folder on your computer. In here you can make changes to files, save them and it will get synced to the VM, which will reload your application if the server is running.
In order to stop the VM while saving the setup:
- Press CTRL+C to cancel the
npm start
command - Write
exit
until you are in your own terminal - Run
vagrant halt
If you aren't inside the VM (vagrant ssh
) in the terminal, you can simply run vagrant halt
in the project folder.
- Go to the root of the project folder
vagrant up
vagrant ssh
cd app/Starter && npm start
Mathias Wøbbe - Initial work - MathiasKandelborg