forked from ScoDoc/ScoDoc
placement_group_size_control #2
@ -76,11 +76,15 @@ then
|
||||
echo "Suppression de la base $DBNAME..."
|
||||
su -c "dropdb $DBNAME" "$SCODOC_USER" || die "Erreur destruction db"
|
||||
fi
|
||||
su -c "createdb $DBNAME" "$SCODOC_USER" || die "Erreur destruction db"
|
||||
su -c "createdb $DBNAME" "$SCODOC_USER" || die "Erreur création db"
|
||||
|
||||
echo "Chargement de la base SQL..."
|
||||
su -c "pg_restore -d $DBNAME ${SCODOC_VAR_DIR}/SCODOC.dump" "$SCODOC_USER" || die "Erreur chargement de la base SQL"
|
||||
|
||||
# -- Apply migrations if needed (only on "production" databse, = SCODOC sauf config particulière)
|
||||
export FLASK_ENV="production"
|
||||
su -c "(cd $SCODOC_DIR && source venv/bin/activate && flask db upgrade)" "$SCODOC_USER"
|
||||
|
||||
# -- Start ScoDoc
|
||||
systemctl start scodoc9
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user