Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

aronwk-aaron/MSState-Library-ETD

Repository files navigation


Library-ETD

Fall 2018 spring 2019 Senior design Project

Electronic Thesis and Dissertation system for the MSState Library

Requirements

  • Python 3.7.2
  • Pycharm

Helpfu Links

Setup

Developement

  • 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 it local_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 password hashing options in settings.py

Deployment

Docker

  • 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

Not Docker

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

Notes

  • /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

About

Senior Design Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages