Last active
November 9, 2021 16:13
-
-
Save garethrees/a8b314fbcd7396e740f1 to your computer and use it in GitHub Desktop.
Alaveteli dev install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Host | |
# ------------------------------------------------------------------------------ | |
# Go to your main code directory | |
cd ~/Code | |
# Clone alaveteli | |
git clone --recursive https://github.com/mysociety/alaveteli.git | |
cd alaveteli | |
git checkout master # Or the specific version a site is running on, e.g. `0.20.0.14` | |
# Make the themes directory and clone the theme | |
mkdir -p ../alaveteli-themes | |
pushd ../alaveteli-themes | |
git clone git@github.com:YOUR_GITHUB_USERNAME/dirittodisapere-theme.git | |
popd | |
# Create the VM | |
cd alaveteli | |
ALAVETELI_VAGRANT_MEMORY=3072 ALAVETELI_VAGRANT_FQDN=10.10.10.30 vagrant up | |
# If fails on Debian: | |
vagrant ssh -c "sudo apt -y install linux-headers-amd64" | |
vagrant provision | |
vagrant ssh | |
# Guest | |
# ------------------------------------------------------------------------------ | |
cd alaveteli | |
cp config/general.yml config/general-dirittodisapere-theme.yml | |
rm config/general.yml | |
# Edit config/general-dirittodisapere-theme.yml: | |
# | |
# DOMAIN: 10.10.10.30 | |
# THEME_URL: | |
# - https://github.com/YOUR_GITHUB_USERNAME/dirittodisapere-theme | |
script/switch-theme.rb dirittodisapere-theme | |
bundle exec rake assets:clean | |
bundle exec rails s -b 0.0.0.0 | |
# Host | |
# ------------------------------------------------------------------------------ | |
open http://10.10.10.30:3000 |
Need to sudo apt-get -y remove bundler && sudo gem install bundler
after installing a brightbox-provided Ruby.
vagrant ssh-config
to update Postico connection details – usually just need to update the private key.
Alaveteli does this automatically, but for future ref, creating vagrant as postgres superuser:
sudo -u postgres createuser --createdb --no-createrole --no-superuser 'vagrant'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some other things:
Set git emailvagrant
user all dbs0.0.0.0/0
/::1/128
inpg_hba.conf
to browse DBs with Postico app:add "home" to top ofgem_paths
in.gemrc
?Update bundlersudo apt-get -y remove bundler && sudo gem install bundler
export DISABLE_SPRING=1
RAILS_ENV=test bundle exec rake db:create db:migrate