-
-
Notifications
You must be signed in to change notification settings - Fork 196
Setting up a demo site
Brief instructions to get a demo site up quickly for your jurisdiction, in your language, with your public bodies, and without major security issues.
TODO: Remove default public bodies
From mySociety's EC2 AMI guide
Assumes you already have an EC2:
- account
- key pair
- security group that opens ports 22 and 80
For a production website, you need to open port 25 for email.
- Login to your AWS EC2 Console
- Click "Launch Instance"
- Click "Continue" to use the Classic Wizard
- Click the "Community AMIs" tab
- Select "64-bit" in the "Viewing:" select list and search for "ami-4d0ebc24"
- Click "Select" once the AMI is found
- Select your "Instance Type:" (medium is recommended for performance)
- Click "Continue" repeatedly
- Click "Launch"
You should be able to access your website at e.g. ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com
.
From mySociety's installation guide
-
Go to
http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/en/profile/sign_in
and sign up -
Check your email and confirm your account
-
Go to
http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/admin?emergency=1
-
Login with username
adminxxxx
and passwordpasswordx
-
Go to
http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/en/admin/user/edit/3
-
Change "Admin level" to
none
and click "Save" -
Go to
http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/en/admin/user/list
-
Click on the name of the user you created, click "Edit", change "Admin level" to
super
and click "Save" -
Secure the emergency username and password:
sed -i "s/adminxxxx/`openssl rand -base64 32`/" config/general.yml sed -i "s/passwordx/`openssl rand -base64 32`/" config/general.yml ./script/rails-post-deploy
- Go to
http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/en/admin/body/import_csv
The lowercase, accentless versions of the names of public bodies must be unique.
- Go to
http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/en/admin/request/list
- Click on each request
- Check the "Not a valid FOI request" radio button
- Click "Hide request"
-
Install the Transifex client:
sudo apt-get update sudo apt-get install python-setuptools sudo easy_install --upgrade transifex-client
-
Create a Transifex configuration file and download the translations (replace
LOCALE
below):sudo su - alaveteli cd $HOME tx init --host https://www.transifex.net cd $HOME/alaveteli tx pull -a -f bundle exec rake gettext:store_model_attributes bundle exec rake gettext:find sed -i 's/ es/ LOCALE/' config/general.yml ./script/rails-post-deploy
Additional documentation:
- Customize the theme
- Translate the interface
- Configure Rails for your locale
- Choose your request states
Note: tx init
is run outside the Alaveteli directory to avoid overwriting .tx/config
.
-
Use the stable version of Alaveteli:
ssh -i /path/to/keypair.pem [email protected] sudo su - alaveteli cd $HOME git checkout master git pull ./script/rails-post-deploy
Additional documentation: