added sync env script and updated deps

master
Drew Bednar 3 years ago
parent 6301de5518
commit ab89389c1a

3
.gitignore vendored

@ -138,4 +138,5 @@ dmypy.json
# Cython debug symbols # Cython debug symbols
cython_debug/ cython_debug/
.idea/ .idea/

@ -66,4 +66,7 @@ Then you need to specify the secret in your deployment spec like so:
- name: regcred - name: regcred
``` ```
[The k8s docs](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line) [The k8s docs](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line)
# References
- [SQLAlchemy patterns I used to use]: (https://git.runcible.io/androiddrew/molten_exp/src/branch/master/market_look/model.py)

@ -1 +1,2 @@
requirements.in requirements.in
.env

@ -1,4 +1,6 @@
python-dotenv==0.19.2
flask==2.0.2 flask==2.0.2
psycopg-binary==3.0.4 psycopg2-binary==2.9.2
gunicorn==20.1.0 gunicorn==20.1.0
flask-cors==3.0.10 flask-cors==3.0.10
sqlalchemy==1.4.27

@ -2,28 +2,34 @@
# This file is autogenerated by pip-compile with python 3.8 # This file is autogenerated by pip-compile with python 3.8
# To update, run: # To update, run:
# #
# pip-compile --output-file=backend/requirements.txt backend/requirements.in # pip-compile requirements.in
# #
click==8.0.3 click==8.0.3
# via flask # via flask
flask==2.0.2 flask==2.0.2
# via # via
# -r backend/requirements.in # -r requirements.in
# flask-cors # flask-cors
flask-cors==3.0.10 flask-cors==3.0.10
# via -r backend/requirements.in # via -r requirements.in
greenlet==1.1.2
# via sqlalchemy
gunicorn==20.1.0 gunicorn==20.1.0
# via -r backend/requirements.in # via -r requirements.in
itsdangerous==2.0.1 itsdangerous==2.0.1
# via flask # via flask
jinja2==3.0.3 jinja2==3.0.3
# via flask # via flask
markupsafe==2.0.1 markupsafe==2.0.1
# via jinja2 # via jinja2
psycopg-binary==3.0.4 psycopg2-binary==2.9.2
# via -r backend/requirements.in # via -r requirements.in
python-dotenv==0.19.2
# via -r requirements.in
six==1.16.0 six==1.16.0
# via flask-cors # via flask-cors
sqlalchemy==1.4.27
# via -r requirements.in
werkzeug==2.0.2 werkzeug==2.0.2
# via flask # via flask

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
# Pre-configuration
# Set working directory to root
cd "$(dirname "$0")/../"
CDIR=$(pwd -P)
export CDIR
VIRTUAL_ENV="${VIRTUAL_ENV:-}"
REQUIREMENTS="${CDIR}/backend/requirements.txt"
DEV_REQUIREMENTS="${CDIR}/dev_requirements.txt"
function sync_env () {
if [ -z "${VIRTUAL_ENV}" ]; then
echo "warning: you are not in a virtualenv. Skipping sync."
exit 1
else
echo "Syncing virtualenv"
pip-sync $REQUIREMENTS $DEV_REQUIREMENTS
fi
return 0
}
sync_env
Loading…
Cancel
Save