Growth app is an app for Stack Overflow activists who want to bring collaborative knowledge sharing to their language.
-
Check out code from GitHub to any folder.
-
Create a symbolic link
ln -s /path/to/your/folder/growth-app/ /home/growth_app
. It means that we assume that the root directory of the project is "/home/growth_app". If you want to user another directory, take a look at the growth-app/growth_app.wsgi, and growth-app/growth_app.conf. -
Set up apache according the app folder and the version of apache. You can find growth_app.conf for
/home/growth_app
and for apache 2.2. -
You need apache web server, mod_wsgi, postgres 9+ installed.
-
Install Flask and Flask's modules
pip install Flask
pip install Flask-Babel
pip install Flask-SQLAlchemy
pip install Flask-OpenID -
Login to postgres.
psql -U postgres -h localhost -d template1
-
Create a user and a database.
CREATE USER your user;
CREATE DATABASE growth_app;
GRANT ALL PRIVILEGES ON DATABASE growth_app TO your_user;
* If you cannot log in as a postgres see this. ** If there are issues with auth see this.
-
Create a local_settings.py file in the growth-app folder with following variables
STACKEXCHANGE_CLIENT_SECRET = "secret"
STACKEXCHANGE_CLIENT_KEY = "key"
STACKEXCHANGE_CLIENT_ID = idFLASK_SECRET_KEY = 'key'
PG_NAME_PASSWORD = "name:pass" -
Execute
python growth_app.py --init_db
. This command creates database tables according the models. -
Execute
python growth_app.py --load_sites
. This command loads 'site_conf.json' and fills the Site database table. -
Execute
python growth_app.py --load_activities
. This command loads activities and activists from activities_conf.json.
This was it. Now it should work. If it does not, please ping @NicolasChabanovsky in The Terminal.