Installing the project¶
System Requirements¶
- Debian flavor of linux (tested on Ubuntu 16.04)
- A non root user with
sudoprivileges - Node v.8
Create a secrets.py file¶
A secrets.py file is used to store several things. This file needs to be restricted in production environments using chmod.
The file needs to contain the following:
- Database username and password
- Both should be set during the
setup_script. Make sure you have the same credentials copied over (username’s default iscatalog) or the application will not work.
- Both should be set during the
- Flask’s
secret_keywhich is used for session cryptography- To generate a good key run
$ python3 -c 'import secrets; print(secrets.token_bytes(16))'
- To generate a good key run
An example secrets.py file would be as follows:
db_username = 'catalog'
db_password = 'catalog'
flask_secret_key = b'\xfa\x85\xf7\xcc/I\xb7\xf2\xa1P\xb0o\xae\x95s\x17'
Install Steps¶
- First time setup (This project has to be run in a debian based environment)
- All commands should be run from the project root unless a cd command was instructed previously
- Run
$ ./server_management/setup_script.pyrespond yes when prompted if this is your first time. - Run
$ source env/bin/activate - Run
$ python -m portal_server.db.setup - If you want fake data in your db run
$ python -m portal_server.db.import_fake_data $ cd portal_server/directory/home_static- Run
$ npm install - Run
$ npm run build - Return to project root
$ cd ../../.. - See Running the Project for instructions on running the project
- Visit the login page