Use pyenv
to install Python 3.6.1
https://github.com/pyenv/pyenv
pyenv install 3.6.1
git clone https://github.com/lancetw/newstw.git
cd newstw
make install
First you should activate the Python Virtual Environment:
source ./venv/bin/activate
Setup your database settings (Default to SQLite):
mkdir -p storage
cp alembic.ini dev.ini
cp .env.example .env
You should check and set DATABASE_URL
and FACEBOOK_ACCESS_TOKEN
in the .env
file.
after you set up, initialize the database tables:
source .env
make revision
make upgrade
Congratulations, now you can run the services:
make run_news_archiver
make run_observer
Follow Installation
and Virtual Environment
instructions.
cp alembic.ini prod.ini
cp .env.example .env
Modify DATABASE_URL
and FACEBOOK_ACCESS_TOKEN
in the .env
file.
Modify DELETE_KEY
if you want delete or update some articles via web APIs.
source .env
make revision
make upgrade
We recommend you install circus
to run services as daemon, also see config/circus_newstw.conf
.