Skip to content


Subversion checkout URL

You can clone with
Download ZIP
JavaScript Python CSS HTML Other
Branch: master

Merge pull request #67 from dongweiming/libmc

use libmc instead of memcached
latest commit 44ad53dc4c
@dongweiming dongweiming authored

Build Status

Douban CODE


Docker Installation

You can use code

$docker pull dongweiming/code

or just build locally(recommended):

$cd code
$docker build -t code .

And launch a bash shell inside the container:

$docker run -d -p 8080:8000 code gunicorn -w 2 -b app:app  # start app
$boot2docker ip
# go web
$docker run -t -i code /bin/bash

Quick Installation

Currently supports the following systems:

  • gentoo
  • ubuntu/debian
  • centos/redhat/fedora
  • opensuse
  • archlinux

You only to excute:

bash <(curl -s

Notes: The install script in code/scripts subdirectory, for example ubuntu/debian, You can see code/scripts/


  • mysql # default port
# import vilya/databases/schema.sql to database `valentine`
$ mysql -uroot -e 'create database valentine;'
$ mysql -uroot -D valentine < vilya/databases/schema.sql
  • memcached # default port

  • customize code config

# after clone code repo you can change the default config by:
$ cd {CODE_REPO}
$ cp vilya/ vilya/
# overwrite configs defined in vilya/
$ vim vilya/

Getting started

git clone
cd code
mysql -uroot -e 'create database valentine;'
mysql -uroot -D valentine < vilya/databases/schema.sql
virtualenv venv
. venv/bin/activate
pip install cython  # should install first
pip install -U setuptools
pip install -r requirements.txt
gunicorn -w 2 -b app:app  # web & git http daemon


  1. single http daemon

    • gunicorn -b smart_httpd:app # git http daemon
  2. vilya.config.DOMAIN

    • if you run 'gunicorn -b IP:PORT app:app', the DOMAIN should be 'http://IP:PORT/'


CODE is under Revised BSD License. See the LICENSE file for the full license text.

Something went wrong with that request. Please try again.