Elephant In The Room is an opensource multi-site news page project.
In order to run this project you need to have already installed:
Run the website with the following commands:
Install project dependencies:
make deps
Start the database server:
make ops
The following commands need to be executed in a separate shell:
Create elephant's database, run migrations, and seed data:
make create_db
Start the web server:
make dev
You can populate the database with dummy data using make populate_db
or make clean_populate_db
to reset the DB and populate. Both of this will create 4 default sites, one uses localhost
as domain, but the others use custom domains (site-2.com, site-3.com, site-4.com) so you will need to add them to your /etc/hosts
file to be able to access them. Append the following:
127.0.0.1 site-2.com
127.0.0.1 site-3.com
127.0.0.1 site-4.com
The backup can be generated sending a POST request /admin/backup/do_backup
or in the admin panel /admin/backup
pressing the botton backup now
. After the backup is generated it can be downloaded to pressing the download latest backup
that will appear when the backup generation process ends.
The restoration of the database is manual, it can be done this way:
export PGPASSWORD=<db_password> && \
psql -h <db_host> -U <db_user> -c "drop database <database_name>; create database <database_name>;" && \
psql -h <db_host> -U <db_user> -v ON_ERROR_STOP=1 <database_name> < \
<location_of_backup>.sql
WARNING: This will first destroy the database and all its data before it recovers the backup.