diff --git a/HACKING.md b/HACKING.md index ad393be82..55a636d2b 100644 --- a/HACKING.md +++ b/HACKING.md @@ -18,23 +18,26 @@ and requires about 4.5 GB of disk space. 2. To download, setup, run, and configure a VM for FreedomBox development using Vagrant, simply execute in your FreedomBox Service (Plinth) development folder: - ``` $ vagrant up ``` -3. To access FreedomBox web interface (from host), visit - https://localhost:4430/plinth/ - -4. Edit the source code in your host machine's FreedomBox Service (Plinth) - development folder. By default, this folder is shared within the VM, at - `/vagrant/`. To actually reflect the changes in the running VM, run on your - host: - +3. SSH into the running vagrant box with the following command: ``` - $ vagrant provision + $ vagrant ssh ``` +4. Run the development version of Plinth from your source directory in the + virtual machine using the following command. This command continuously + deploys your code changes into the virtual machine providing a quick feedback + cycle during development. + ``` + $ sudo /vagrant/run --develop + ``` + +Note: This virtual machine has automatic upgrades disabled by default. + + ## Installing Dependencies Apart from dependencies listing in INSTALL.md file, there may be additional diff --git a/Vagrantfile b/Vagrantfile index 1260a1e31..0644b2282 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,12 +25,19 @@ Vagrant.configure(2) do |config| apt update DEBIAN_FRONTEND=noninteractive apt install -y $(plinth --list-dependencies) systemctl daemon-reload - systemctl restart plinth SHELL - config.vm.post_up_message = "FreedomBox machine is ready for development. -You can access it on https://localhost:4430/plinth/ (with an invalid -SSL certificate). You can modify source code on the host machine and -then test it by running: -$ vagrant provision + config.vm.provision "shell", run: 'always', inline: <<-SHELL + # Do not run system plinth + systemctl stop plinth + systemctl disable plinth + # Disable automatic upgrades + /vagrant/actions/upgrades disable-auto + SHELL + config.vm.post_up_message = "FreedomBox virtual machine is ready +for development. You can run the development version of Plinth using +the following command. +$ sudo /vagrant/run --develop +Plinth will be available at https://localhost:4430/plinth (with +an invalid SSL certificate). " end