Skip to content

sternb0t/fake-news-links

Repository files navigation

Fake News Links

Cataloging fake news content for the public good

What is this?

This is the source code for a proof-of-concept. The idea is to set up a service where people can post URLs of fake news articles. If we create this dataset together, perhaps we can use it as a resource and learn from it.

Examples

Local Development

  1. Create virtualenv using virtualenv --python=python3 fake_news_links
  2. Create secret key using export FAKENEWS_SECRET_KEY='{random_string}'
  3. Create postgres user: createuser fakenews -P - enter fakenews as password
  4. Create postgres database: createdb fakenews -O fakenews
  5. Create database url using export FAKENEWS_DATABASE_URL='postgres://fakenews:fakenews@localhost:5432/fakenews'

Docker

Fake News Links is deployed using Docker containers.

Some notes on the Dockerfile:

To build the docker image locally:

# first make sure we have static assets (js, images, etc.) in the right place
python manage.py collectstatic --no-input -i node_modules

# now build
docker build -t fake-news-links .

To run a container based on this image locally for testing purposes:

docker run -i -t --expose 8080 -p 8080:8080 -e PORT=8080 \
  -e APP_ENV=LOCAL \
  -e FAKENEWS_SECRET_KEY="somethingsecret" \
  -e FAKENEWS_DATABASE_URL="postgres://fakenews:fakenews@$(ifconfig en0 | grep inet | grep -v inet6 | cut -d ' ' -f2):5432/fakenews" \
  fake-news-links

About

Cataloging fake news content for the public good

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published