added sync env script and updated deps
parent
6301de5518
commit
ab89389c1a
@ -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
|
@ -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…
Reference in New Issue