detroitblacktech / webportal

2 stars 4 forks source link

added setuptools #5

Open dr-edmond-merkle opened 5 years ago

dr-edmond-merkle commented 5 years ago

build(docker): changed Dockerfile to build from root requirements

This change moves the requirements build to use the requirements.txt that uses setup.py (setuptools). This should bring the requirments a developer might add to the repo closer to the deployment process and reduce any impedance between how the app is deployed versus how the app is developed.

Any decision to modify the requirements.txt in build/ is left to a different PR around the infrastructure / deployment process.

QA: [-] execute a docker build, and confirm no errors

docker build -t dsiprouter .

[-] execute deploy.sh docker dev and confirm no errors

deploy.sh docker dev

[-] visit site at http://localhost [-] find a song and serenade yourself on how cool coding is

feature(setuptools): new requirements.txt

Added a new requirements.txt that points to setup.py for app setup. This requirements.txt will install the requirements based on the apps defined dependencies.

QA: [-] install through new requirements.txt at root of project

pip install --no-cache-dir -r requirements.txt

[-] run the application

python app.py

[-] were there no errors? Well aren't you a lucky tazmanian devil

build(setuptools): added a setup.py to the project

Added a setup.py for installation of the web portal through python setuptools. This will prepare the app for build script.

Also created a symlink to the build/requirements.txt for now given that we want to tell requirements.txt to use the setup.py for the app.

QA: [-] install the app locally and confirm no errors

$python --version
Python 3.6.6
$ pip --version
pip 19.3.1 from /Users/me/.pyenv/versions/3.6.6/lib/python3.6/site-packages/pip (python 3.6)
$pip install -e .

[-] run the app

$ python app.py
 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
INFO:werkzeug: * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
INFO:werkzeug: * Restarting with stat
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 288-388-175

[-] comment on the nostalgia of the detroit black tech hero image