Fall 2018 spring 2019 Senior design Project
Electronic Thesis and Dissertation system for the MSState Library
- Python 3.7.2
- Pycharm
- Flask microframework
- Jinja2 Templating Engine
- Flask-User User system
- Flask-Login Login system
- Flask-Mail Mail Extension
- Flask-SQLAlchemy Object Relational Mapper
- PostgresSQL Database engine
- Flask-Migrate Database Migration
- Flask-WTForms Form verification
- Flask-Assets webassets integration
- Passlib Argon2 Password Hashing algorithm
- Flask-User Configuration settings
- pycountry Country listing
- arrow Time humanization
- phonenumbers Phone number formatting
- Clone repo and setup in Pycharm as a flask project
- Setup postgresql database for development
- Make a copy of
/app/local_settings_example.py
and name itlocal_settings.py
- Edit the
SQLALCHEMY_DATABASE_URI
to point to your database. - Input your email server settings
- Edit the Admin email, this is used in returning email errors
- Edit the
- Edit the password hashing options in
settings.py
- Same as above except no Pycharm
DEBUG = False
- Generate
SECRET_KEY
- In root of repo, run: (edit the path mappings first)
#build the container
docker build -t etd:latest .
# deploy the container
docker run --name etd -d -p 8000:8000 -v /path/on/host/submissions:/data/submissions -v /path/on/host/documents:/data/documents -v /path/on/host/signatures:/data/signatures etd:latest
- This will start the container on the machine on port
8000
and the data directories mapped outside the contianer
Same as above, except run:
pip install -r requirements.txt
pip install gunicorn
gunicorn -b :8000 -w 4 wsgi:app
This will start Gunicorn with 4 workers.
This is the same thing that the Docker container does
/app/__init__.py
- Main application file
/app/main.py
- Main route
- Templates
/app/templates/main
/app/submissions.py
- Submissions Route
- Templates
/app/templates/submissions
/app/revisions.py
- Revisions Route
- Templates
/app/templates/revisions
/app/templates/flask_user/
- Flask User Templates
/app/templates/flask_user/emails/
- Flask User email templates
/app/models.py
- Database model definitions
/app/schemas.py
- Schema definitions
/app/commands.py
- Custom Flask commands
flask init_db
- Initializes database. WARNING: This is destructive and will destroy and existing database
/app/static/scss/site.scss
- Custom SCSS goes here