Skip to content

Latest commit

 

History

History
77 lines (62 loc) · 2.52 KB

vagrant.md

File metadata and controls

77 lines (62 loc) · 2.52 KB

Installing Monica on Vagrant

Monicahq vagrant box is available on Vagrant Cloud.

The only provider for this box is virtualbox.

Run the monicahq vagrant box

  1. Download and install Vagrant for your operating system
  2. Create a folder to put the vagrant configuration files
mkdir ~/monica
cd ~/monica
  1. Download the Vagrantfile script
curl -sS https://raw.githubusercontent.com/monicahq/monica/master/scripts/vagrant/Vagrantfile -o Vagrantfile
  1. Edit Vagrantfile to set the appropriate host port number (default: 8080)
config.vm.network "forwarded_port", guest: 80, host: 8080
  1. Launch the virtual machine with
vagrant up

The virtual machine will be created and pulled up with Vagrantfile script.

Once the process is complete you can either access the virtual machine by typing vagrant ssh in your terminal, or access the Monica web interface by opening http://localhost:8080 in your browser on your host machine.

Default Monica configuration in the VM

Database users

  • Root database user
    • Username: root
    • Password: changeme
  • Monica database user
    • Username: monica
    • Password: changeme

Apache configuration

  • The project is installed in /var/www/html/monica
  • The root folder for the web server is /var/www/html/monica/public

Build your own image

  1. Download the Vagrantfile script
curl -sS https://raw.githubusercontent.com/monicahq/monica/master/scripts/vagrant/build/Vagrantfile -o Vagrantfile
curl -sS https://raw.githubusercontent.com/monicahq/monica/master/scripts/vagrant/build/install-monica.sh -o install-monica.sh
  1. Run the box by calling:
vagrant up monicahq-latest

for the latest commit, or with a GIT_TAG to run a specific version:

GIT_TAG=$(GIT_TAG) vagrant up monicahq-stable
  1. Package you own box You can package it to use it more quickly later:
vagrant up monicahq-latest
vagrant package monicahq-latest --output ./my-monicahq.box
vagrant box add my-monicahq ./my-monicahq.box