forked from ScoDoc/DocScoDoc
deb creating venv in postinst
This commit is contained in:
parent
9e441232a4
commit
3589c69bca
@ -42,6 +42,7 @@ Expérimental:
|
||||
- installer la clé:
|
||||
en root sur le serveur, lancer
|
||||
|
||||
apt-get install gnupg
|
||||
wget -O - https://scodoc.org/misc/scodoc-repo.gpg.key | apt-key add -
|
||||
|
||||
- apt-get update && apt-get install scodoc9
|
||||
|
@ -7,7 +7,7 @@ die() {
|
||||
}
|
||||
|
||||
PACKAGE_NAME=scodoc9
|
||||
RELEASE_TAG=9.0.0-b
|
||||
RELEASE_TAG=9.0.0-d
|
||||
VERSION=9.0.0
|
||||
RELEASE=1
|
||||
ARCH="amd64"
|
||||
@ -53,12 +53,12 @@ mv "$SCODOC_DIR"/tools/debian "$slash"/DEBIAN || die "can't install DEBIAN dir"
|
||||
chmod 755 "$slash"/DEBIAN/*inst || die "can't chmod debian scripts"
|
||||
|
||||
# ------------ CREATION DU VIRTUALENV
|
||||
echo "Creating python3 virtualenv..."
|
||||
(cd $SCODOC_DIR && python3 -m venv venv) || die "error creating Python 3 virtualenv"
|
||||
#echo "Creating python3 virtualenv..."
|
||||
#(cd $SCODOC_DIR && python3 -m venv venv) || die "error creating Python 3 virtualenv"
|
||||
|
||||
# ------------ INSTALL DES PAQUETS PYTHON (3.9)
|
||||
# pip in our env, as user "scodoc"
|
||||
(cd $SCODOC_DIR && source venv/bin/activate && pip install wheel && pip install -r requirements-3.9.txt) || die "Error installing python packages"
|
||||
#(cd $SCODOC_DIR && source venv/bin/activate && pip install wheel && pip install -r requirements-3.9.txt) || die "Error installing python packages"
|
||||
|
||||
# -------- THE END
|
||||
echo "Terminé."
|
||||
|
@ -31,6 +31,20 @@ SCODOC_RELEASE=$(grep SCOVERSION sco_version.py | awk '{ print substr($3, 2, len
|
||||
SVERSION=$(curl --silent http://scodoc.iutv.univ-paris13.fr/scodoc-installmgr/version?mode=install\&release="$SCODOC_RELEASE")
|
||||
echo "$SVERSION" > "${SCODOC_VERSION_DIR}/scodoc.sn"
|
||||
|
||||
# --- XXX TODO générer SECRET_KEY dans .env ?
|
||||
# idealement, demander le mail de l'admin et son mot de passe lors de la première install
|
||||
# python3 -c "import uuid; print(uuid.uuid4().hex)"
|
||||
|
||||
# ------------ CREATION DU VIRTUALENV
|
||||
#echo "Creating python3 virtualenv..."
|
||||
(cd $SCODOC_DIR && python3 -m venv venv) || die "Error creating Python 3 virtualenv"
|
||||
|
||||
# ------------ INSTALL DES PAQUETS PYTHON (3.9)
|
||||
# pip in our env, as user "scodoc"
|
||||
(cd $SCODOC_DIR && source venv/bin/activate && pip install wheel && pip install -r requirements-3.9.txt) || die "Error installing python packages"
|
||||
|
||||
|
||||
|
||||
# --- POSTGRESQL
|
||||
# --- Ensure postgres user "scodoc" ($POSTGRES_USER) exists
|
||||
init_postgres_user
|
||||
|
Loading…
Reference in New Issue
Block a user