Skip to content

saulhoward/vafan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vafan

A website/api/media-server.

This codebase currently runs the websites:

http://brighton-wok.com
http://convictfilms.com

Technical Overview

A server, written in Go, which can be run as a standalone or behind nginx or Apache. The server requires MongoDB, MySQL and Redis.

A set of templates, css, images and Javascript libraries.

Installation Instructions

Ubuntu 11.10

To install Vafan on a new machine. Instructions are for Oneric (11.10).

  1. Install Ubuntu.

  2. Install git:

     sudo apt-get install git-core
    
  3. Clone vafan:

     cd /srv/
     git clone git://github.com/saulhoward/vafan.git
    
  4. As root, run the setup script to install apt packages:

     cd /srv/vafan
     sudo scripts/ubuntu-setup.sh
    
  5. Optionally, set up your Go environment. Eg.:

     echo "export GOPATH=/usr/lib/go" >> ~/.bashrc
     echo "export GOPATH=$GOPATH:/srv/vafan" >> ~/.bashrc
     source ~/.bashrc
    
  6. Build the vafan-server command:

     cd /srv/vafan/cmd/vafan-server
     go build vafan-server.go
    

    This will complain about missing third-party libraries. You must install them, eg,

     go get code.google.com/p/gorilla/mux
    

    Some of the packages may depend on other Ubuntu packages. For example, googlecode packages use mercurial (hg), so:

     apt-get install mercurial
    

    Once they are installed, you should be able to build vafan-server.go.

  7. Setup MySQL:

     mysql -u root -ppassword
     create database vafan;
     quit
     cd /srv/vafan/data/sql
     mysql -u root -ppassword vafan < users.sql
    
  8. Create the config file.

     mkdir /etc/vafan
     cp /srv/vafan/config/config.ini /etc/vafan/vafan.ini
     vim /etc/vafan/vafan.ini
    
  9. Daemonize, a la AG's ace blog:

     http://nf.id.au/deploying-go-web-services-behind-nginx-under
    

    Using the init.d script in the repo:

     cp /srv/vafan/scripts/vafan-init.sh /etc/init.d/vafan
     chmod +x /etc/init.d/vafan
     ln -s /srv/vafan/cmd/src/vafan-server/vafan-server /usr/sbin/vafan-server
     /etc/init.d/vafan start
     update-rc.d vafan defaults
    

About

web framework for media producers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published