mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-18 08:33:41 +00:00
vagrant: Vagrantfile changes for ease of development
Moved some frequently required operations to the Vagrantfile. Newcomers to the project almost always face the issue of port 8000 not being available. Disabling system Plinth and running only the development version solves this issue. Automatic upgrades are a frequent blocker for development and an unnecessary annoyance on a development setup. - Update documentation about vagrant file changes - Remove plinth restart step Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
7cb7398349
commit
8007289e57
23
HACKING.md
23
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
|
||||
|
||||
19
Vagrantfile
vendored
19
Vagrantfile
vendored
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user