File tree 4 files changed +19
-10
lines changed
4 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 1
1
# About This Application
2
2
3
3
To build this application you must...
4
- 1 . Run the setup file with the command
4
+ 1 . Have python 2.7 and ` virtualenv ` installed
5
+ 2 . Run the setup file with the command
5
6
source setup.sh
6
- 2 . Populate the database with generic values
7
+ 3 . Populate the database with generic values
7
8
python reset-db.py
8
- 3 . Add your current machine user id to admin in config/role .yaml
9
- 4 . Start Appache server to serve application
9
+ 4 . Add your current machine user id to admin in config/roles .yaml
10
+ 5 . Start webserver to serve application
10
11
python run.py
11
- 5 . Open 0.0.0.0:8000 in your browser
12
+ 6 . Open 0.0.0.0:8080 in your browser
12
13
13
14
# Relevant Documentation
14
15
Original file line number Diff line number Diff line change 4
4
- hooverk
5
5
- insengrim
6
6
- ramsayb2
7
+ - heggens
7
8
# - database Roles
8
9
9
10
systemAdmin :
Original file line number Diff line number Diff line change 6
6
import os
7
7
8
8
# Builds the server configuration
9
+ IP = '0.0.0.0'
9
10
if os .getenv ('USER' ):
10
11
hostname = os .getenv ('USER' )
11
- IP = socket .gethostbyname (hostname )
12
- else :
13
- IP = '0.0.0.0'
12
+ try :
13
+ IP = socket .gethostbyname (hostname )
14
+ except :
15
+ pass
14
16
15
17
# Run the web application.
16
18
app .run (debug = config .sys .debug , host = IP , port = config .sys .port )
Original file line number Diff line number Diff line change 4
4
# exporting these variables into the shell environment before
5
5
# sourcing this script. If these variables exist before this
6
6
# script is sourced, then the pre-existing values will be used.
7
- WERKZEUG_VERSION=" ${WERKZEUG_VERSION:- 0.16.0} "
8
7
FLASK_VERSION=" ${FLASK_VERSION:- 0.12.1} "
8
+ WERKZEUG_VERSION=" ${WERKZEUG_VERSION:- 0.16.0} "
9
9
WTFORMS_VERSION=" ${WTFORMS_VERSION:- 2.1} "
10
10
FLASK_SESSION_VERSION=" ${FLASK_SESSION_VERSION:- 0.2.3} "
11
11
FLASK_ADMIN_VERSION=" ${FLASK_ADMIN_VERSION:- 1.4.0} "
47
47
fi
48
48
49
49
# Create and activate a clean virtual environment.
50
- virtualenv --python=/usr/bin/ python2.7 venv
50
+ virtualenv --python=python2.7 venv
51
51
. venv/bin/activate
52
52
53
53
# Create a data directory
@@ -91,3 +91,8 @@ pip install "openpyxl==$OPENPYXL_VERSION" #2.4.5
91
91
92
92
pip install " unidecode==$UNIDECODE_VERSION " # 0.4.20
93
93
# https://pypi.python.org/pypi/Unidecode
94
+
95
+ export FLASK_APP=run.py
96
+ export FLASK_ENV=development
97
+ export FLASK_RUN_PORT=8080
98
+ export FLASK_RUN_HOST=0.0.0.0 # To allow external routing to the application for development
You can’t perform that action at this time.
0 commit comments