Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

okfn-brasil/tagarela

Repository files navigation

THIS IS AN OLD REPOSITORY! Check new repositories


Tagarela (Beta)

Microservice for comments.

Similar to Isso, but using Viralata for authentication.

An example of web interface using this microservice as backend is Cuidando2.

Install

$ python setup.py develop

If you are using Postgres:

$ pip install psycopg2

Place a settings/keypub file with the public key used by the Viralata instance.

Prepare DB

Create the database and user, set them in settings/local_settings.py as SQLALCHEMY_DATABASE_URI.

SQLALCHEMY_DATABASE_URI = 'postgresql://<user>:<password>@localhost/<database>'

Create tables:

$ python manage.py initdb

Run!

$ python manage.py run

OpenShift Hosting

This code should be OpenShift ready. So it should be possible to host it for free.

Using rhc (don't forget to set the URL for the used repository; maybe this one?):

rhc app create tagarela python-2.7 postgresql-9.2 --from-code=<code-for-repo>

Looks like OpenShift Postgres is not doing Vacuum, so we do it with a cron job:

rhc cartridge add cron -a tagarela

You will also need a keypub file for the used Viralata instance and a local_settings.py file. You can use settings/local_settings.openshift_example.py as an example for the second one. Place both files in ~/app-root/data/, inside the OpenShift gear. And, from inside the gear, using SSH, init the DB:

. $OPENSHIFT_PYTHON_DIR/virtenv/bin/activate
~/app-root/repo
python manage.py -s $OPENSHIFT_DATA_DIR initdb

API

Needs a 'static' doc, but accesssing the root of a hosted instance it's possible to see a Swagger doc.

Name

Tagarela, in Brazilian Portuguese, means a person who talks a lot...

Known Issues

If you are using Gmail to send comment abuse e-mails, it's possible it will block sending them, by security restrictions. After the problem happened, you can unlock it here.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published