djahren / link

See what you've got in common

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tl;dr:

Plain python:

Using Python 3.7+

pip install -r requirements.txt
python link.py DB_DSN=sqlite:///link.sdb

When run like that it'll print out SECRET=<random string> - this is the randomly generated session encryption key. You can then add SECRET=... after DB_DSN=... to make sure that cookies stay compatible between site reloads.

Run unit tests with:

pytest

Or inside docker:

docker build -t link .
docker run -t -p 0.0.0.0:8100:8000 link

And then the website should be visible at http://localhost:8100/

By default we use an sqlite database in /db, which will be wiped when the container stops. To keep /db on a named volume so it will be saved between runs, add -v linkdb:/db after run.

If you want to use an external database, add -e DB_DSN=postgres://user:password@hostname/database after run.

About

See what you've got in common

License:GNU General Public License v3.0


Languages

Language:Python 62.5%Language:Mako 34.3%Language:CSS 1.6%Language:Dockerfile 0.9%Language:JavaScript 0.7%