-
-
Notifications
You must be signed in to change notification settings - Fork 196
Testing install scripts
To test Alaveteli install scripts on my Apple Silicon mac without Vagrant I have been using OrbStack.
From the OrbStack dashboard, you can create a new Debian machine, you can then right click on the VM and "Open Terminal"
This will open a shell in the virtual machine. Install rsyslog and get the install script.
gbp@alaveteli:~$ sudo apt-get install -y rsyslog
gbp@alaveteli:~$ curl -O https://raw.githubusercontent.com/mysociety/commonlib/master/bin/install-site.sh ~/
Install Alaveteli.
gbp@alaveteli:~$ sudo sh ~/install-site.sh alaveteli alaveteli alaveteli.orb.local
Wait until "Installation complete" message, then start thin
:
gbp@alaveteli:~$ sudo systemctl start alaveteli-thin
In your browser go to http://alaveteli.orb.local/ - NB: no SSL by default.
You can become the alaveteli
user with sudo -iu alaveteli
and cd /var/www/alaveteli.orb.local/alaveteli
to run Rails commands.
OrbStack supports two-way file sharing so all your files on your Mac are available from the VM. So you can cd
into your local Alaveteli directory where a non master
or WIP branch might be checked out.
Due to how the install script works you actually should cd
in to the parent directory, EG: Use /Users/gbp/Developer/work
, not /Users/gbp/Developer/work/alaveteli
.
From there you can run the install script with the dev
flag.
sudo sh ~/install-site.sh --dev alaveteli alaveteli alaveteli.orb.local
You can become the alaveteli
user with sudo -iu alaveteli
and cd
to use Alaveteli directory, say /Users/gbp/Developer/work/alaveteli
this time (not the parent directory) and start the development server with RAILS_DEVELOPMENT_HOSTS=alaveteli.orb.local bin/rails s -b 0.0.0.0
In your browser go to http://alaveteli.orb.local:3000/ - NB: no SSL by default.