GithubHelp home page GithubHelp logo

rtvt123 / acoustid-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acoustid/acoustid-server

0.0 2.0 0.0 917 KB

MOVED TO https://bitbucket.org/acoustid/acoustid-server

Home Page: https://bitbucket.org/acoustid/acoustid-server

License: MIT License

Python 88.44% JavaScript 0.49% CSS 0.98% HTML 5.74% Shell 1.05% PLpgSQL 3.29%

acoustid-server's Introduction

AcoustID Server

Installation

On Ubuntu you can install all dependencies using the following commands (as root):

sudo apt-get install postgresql postgresql-contrib
sudo apt-get install redis-server
sudo apt-get install python python-dev python-virtualenv

You will also need one custom PostgreSQL extension:

echo "deb http://deb.oxygene.sk/ubuntu `lsb_release -c -s` main" | sudo tee /etc/apt/sources.list.d/oxygene.list
sudo apt-get update
sudo apt-get install postgresql-9.X-acoustid

(You can also compile it yourself from sources.)

Setup Python virtual environment:

virtualenv e
source e/bin/activate
pip install -r requirements.txt

Prepare the configuration file:

cp acoustid.conf.dist acoustid.conf
vim acoustid.conf

Create the PostgreSQL database:

sudo -u postgres createuser acoustid
sudo -u postgres createdb -O acoustid acoustid

Install extensions into the newly created database:

sudo -u postgres psql acoustid -c 'CREATE EXTENSION intarray;'
sudo -u postgres psql acoustid -c 'CREATE EXTENSION pgcrypto;'
sudo -u postgres psql acoustid -c 'CREATE EXTENSION acoustid;'

Create the database structure:

./run_psql.sh <sql/CreateTables.sql
./run_psql.sh <sql/CreateFunctions.sql
./run_psql.sh <sql/CreatePrimaryKeys.sql
./run_psql.sh <sql/CreateFKConstraints.sql
./run_psql.sh <sql/CreateIndexes.sql

Setup a MusicBrainz slave database (without custom extensions):

cd /path/to/mbslave
cp mbslave.conf.default mbslave.conf
vim mbslave.conf
echo 'CREATE SCHEMA musicbrainz;' | ./mbslave-psql.py
sed 's/cube/text/i' sql/CreateTables.sql | ./mbslave-psql.py
./mbslave-import.py mbdump.tar.bz2 mbdump-derived.tar.bz2
./mbslave-psql.py <sql/CreatePrimaryKeys.sql
vim sql/CreateFunctions.sql # remove functions that mention "cube"
./mbslave-psql.py <sql/CreateFunctions.sql
grep -vE '(collate|page_index|gist)' sql/CreateIndexes.sql | ./mbslave-psql.py
./mbslave-psql.py <sql/CreateViews.sql
./mbslave-psql.py <sql/CreateSimpleViews.sql
./mbslave-sync.py

TODO

Development

Normally, you can start the web application like this:

./run_web.sh

If you want to test it with HTTP enabled, use this:

./run_web.sh --ssl

Then setup forwarding from the standard HTTPS port 443 to the application port:

sudo redir --lport=443 --cport=5000

Add 127.0.0.1 acoustid.org to your /etc/hosts file and then you can see the development version of the application at https://acoustid.org.

Unit Tests

Before you can run the test suite, you need to create a configuration file called acoustid-test.conf. This should use a separate database from the one you use for development, but it should have the same structure. The simplest way to create it is to copy your development database.

You can then run the test suite like this:

nosetests -v

The first thing it does is setting up the database. Normally you shouldn't need to do this more than once, so the next time you can run the test suite without the database setup code:

SKIP_DB_SETUP=1 nosetests -v

acoustid-server's People

Contributors

adamansky avatar jonnyjd avatar lalinsky avatar mineo avatar navap avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.