2.1 KiB
Virtual Machine Instructions
These instructions allow to deploy a testing or development instance of Fab-manager inside a virtual machine, with most of the software dependencies installed automatically and avoiding to install a lot of software and services directly on the host computer.
Note: The provision scripts configure the sofware dependencies to play nice with each other while they are inside the same virtual environment but said configuration is not optimized for a production environment.
Note 2: The perfomance of the application under the virtual machine depends on the resources that the host can provide but will usually be much more slower than a production environment.
-
Install Vagrant and Virtual Box (with the extension package).
-
Retrieve the project from Git
git clone https://github.com/sleede/fab-manager
-
From the project directory, run:
vagrant up
-
Once the virtual machine finished building, reload it with:
vagrant reload
-
Log into the virtual machine with:
vagrant ssh
-
While logged in, navigate to the project folder and install the Gemfile dependencies:
bundle install yarn install
-
Set up the databases. (Note that you should provide the desired admin credentials and that these specific set of commands must be used to set up the database as some raw SQL instructions are included in the migrations. Password minimal length is 8 characters):
rails db:create rails db:migrate # Be sure not to use the default values below in production ADMIN_EMAIL='admin@email' ADMIN_PASSWORD='adminpass' rails db:seed rails fablab:es:build_stats # for tests RAILS_ENV=test rails db:create RAILS_ENV=test rails db:migrate
-
Start the application and visit
localhost:3000
on your browser to check that it works:foreman s -p 3000