humungus - old-flak

i am gravely disappointed

just walk away and there will be an end to the horror

overview - files - changes

viewing file: old-flak/ README

view - history - annotated - download

this was flak

-- requirements

lua-tedu
memcached
sqlite3
python2.7
py-pygments
nginx

-- setup
$ encrypt -b10 password
$2b$10$T.U2FInjMEY2lJTPJ4Fc/u9pshhMJWnj6Wj9K1vx.JC2.0AMdSSjK

$ sqlite3 -init schema.sql flak.db
sqlite> insert into users (name, hash, flags) values ('user',
'$2b$10$T.U2FInjMEY2lJTPJ4Fc/u9pshhMJWnj6Wj9K1vx.JC2.0AMdSSjK', 1);
sqlite> .quit

-- config
config goes into a file called... config.
probably need to configure urlprefix and homeurl for login and RSS to work.

memcachedserver=./flakmem.sock
urlprefix=/test-flak
homeurl=https://localhost/test-flak/
iconurl=https://cdn/icon.png
nprocs=4

-- startup
memcached -s flakmem.sock &
python2.7 pyggy.py &
luajit flak.lua

-- nginx.conf
http {
	proxy_cache_path /var/www/cache levels=2 inactive=24h keys_zone=flak:5m max_size=100m;
	gzip  on;
	gzip_proxied any;
	gzip_types text/plain text/css text/javascript;
}

server {
	ssl on;
	proxy_set_header X-Secure  "yes";

	location /test-flak/ {
		proxy_pass http://localhost:8887/;
		if ($http_cookie ~* "token") {
			set $no_cache "1";
		}
		proxy_no_cache $no_cache;
		proxy_cache_bypass $no_cache;
		proxy_cache flak;
	}
}