aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.json2
-rw-r--r--install.sh55
2 files changed, 10 insertions, 47 deletions
diff --git a/app.json b/app.json
index 2873f5b9..181d6e40 100644
--- a/app.json
+++ b/app.json
@@ -34,7 +34,7 @@
"value": ""
},
"ADMIN_EMAIL": {
- "description": "Your email address for the authentication to the platform as an administrator.",
+ "description": "Administrator email address.",
"required": true,
"value": ""
},
diff --git a/install.sh b/install.sh
index 43ddd96a..1733c718 100644
--- a/install.sh
+++ b/install.sh
@@ -7,54 +7,20 @@
#
-sudo apt-get install -y build-essential git wget > /dev/null
-sudo apt-get install -y libxml2-dev libxslt1-dev > /dev/null # for lxml
-sudo apt-get install -y libssl-dev openssl > /dev/null # for pip
+sudo apt-get install npm
+pipenv install
+npm install
-
-PYTHON_VERSION=3.6.4
-echo "Installation of Python..."
-if [ "$1" == postgres ]; then
- sudo apt-get install -y libpq-dev > /dev/null
-elif [ "$1" == sqlite ]; then
- sudo apt-get install -y libsqlite3-dev > /dev/null
-fi
-wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz
-tar -xf Python-$PYTHON_VERSION.tar.xz
-rm Python-$PYTHON_VERSION.tar.xz
-cd Python-$PYTHON_VERSION/
-export PYTHONHOME=/usr/local/
-export LD_RUN_PATH=/usr/local/lib/
-./configure --enable-loadable-sqlite-extensions --enable-shared --enable-optimizations
-make
-sudo make install
-cd ..
-sudo rm -Rf Python-$PYTHON_VERSION/
-
-
-
-PYTHON_VERSION=3.6
-echo "Installing required Python libraries..."
-sed -i '/psycopg2/d' requirements.txt > /dev/null
-sudo pip$PYTHON_VERSION install --upgrade pip > /dev/null
-sudo pip$PYTHON_VERSION install --upgrade -r requirements.txt > /dev/null
-
-
-
-# Initializes the configuration file
cp src/conf/conf.cfg-sample src/conf/conf.cfg
# Delete default database configuration
sed -i '/database/d' src/conf/conf.cfg
sed -i '/database_url/d' src/conf/conf.cfg
-
-
# Configuration of the database
if [ "$1" == postgres ]; then
echo "Installing requirements for PostgreSQL..."
- sudo apt-get install -y postgresql postgresql-server-dev-9.4 postgresql-client > /dev/null
- sudo pip$PYTHON_VERSION install psycopg2 > /dev/null
+ sudo apt-get install -y postgresql > /dev/null
echo "Configuring the database..."
echo "127.0.0.1:5433:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass
chmod 0600 ~/.pgpass
@@ -74,14 +40,11 @@ elif [ "$1" == sqlite ]; then
echo 'database_url = sqlite:///newspipe.db' >> src/conf/conf.cfg
fi
-
+pipenv shell
echo "Initialization of the database..."
-python$PYTHON_VERSION src/manager.py db_empty
-python$PYTHON_VERSION src/manager.py db_create
-
-
+python src/manager.py db_empty
+python src/manager.py db_create
-echo "Installation terminated."
-echo "Launch Newspipe with the command:"
-echo -e "\tpython$PYTHON_VERSION src/runserver.py"
+echo "Launching Newspipe..."
+python src/runserver.py
bgstack15