GithubHelp home page GithubHelp logo

EqBeats

Running a dev environment in docker

A very easy way to get a dev environment set up is by using Docker and Docker Compose. Once Docker and Docker Compose are installed on your system, run

docker-compose up

Once the image is built and the services are up, a brand new instance of EqBeats will be listening on localhost:8642. To rebuild, run

docker-compose build

Setting up a dev environment by hand

Dependencies

  • A webserver that supports FastCGI
  • PostgreSQL with libpq
  • libfcgi (or just fcgi in some package managers)
  • GNU cgicc
  • spawn-fcgi
  • libpcre++ (sometimes included with pcre)
  • TagLib >= 1.9
  • ImageMagick
  • Nettle
  • ctemplate
  • FFmpeg compiled with libfdk_aac and libopus support
  • Redis and hiredis
  • Optional: OpenBSD netcat for hitsd

Preliminary setup

Environment

You can set the EQBEATS_HTTPS variable to anything if you wish to always use HTTPS.

You also need to make sure that you are in the http group, as well as the user running the webserver.

You need the following file structure, writable by the user that will run EqBeats:

  • EQBEATS_DIR (by default: /var/lib/eqbeats/)
  • EQBEATS_DIR/tracks
  • EQBEATS_DIR/art
  • EQBEATS_DIR/art/medium
  • EQBEATS_DIR/art/thumb

Web server

We’ll assume you put the FastCGI socket in /run/eqbeats/eqbeats.sock, and that EqBeats’s data files are installed in /usr/share/eqbeats.

Here is a sample config for nginx:

server {
    listen       [::]:80;
    server_name localhost;
    client_max_body_size 100m;

    error_page 502 /static/502.html;

    location / {
        include fastcgi.conf;
        fastcgi_pass unix:/run/eqbeats/eqbeats.sock;
    }
    location /static {
        alias /usr/share/eqbeats/static/;
    }
    location /downloads/art {
        internal;
        alias /var/lib/eqbeats/art/;
    }
    location /downloads/tracks {
        internal;
        alias /var/lib/eqbeats/tracks/;
    }
    location /robots.txt {
        alias /usr/share/eqbeats/static/robots.txt;
    }
}

PostgreSQL database

By default, EqBeats will use the default PostgreSQL DB for your user, so make sure you have one and that the pgcrypto extension is enabled on it.

su postgres -c 'createuser -d YOURNAME'
su YOU -c 'createdb'
su postgres
echo "CREATE EXTENSION pgcrypto;" | psql -d YOURNAME

Then, import the database schema:

psql -d YOURNAME < sql/db.sql

Redis database

If you want statistics support, you need to set up a Redis server to listen on a Unix socket (like /run/eqbeats/redis.sock). It is recommended that only the user that runs EqBeats is allowed to access it.

A sample Redis configuration is available in conf/redis-eqbeats.conf. A systemd unit is also provided in conf/redis-eqbeats.service.

Installing from source

If you want to generate the configure script, run:

./autogen.sh

You can then see the available options with:

./configure --help

After that, the usual procedure will do:

./configure
make
make install

Running

If you’re running systemd, you can use the service unit at conf/eqbeats.service. You’ll need to have spawn-fcgi and multiwatch installed in order to use it. You might as well want conf/tmpfiles-eqbeats.conf (see tmpfiles.d(5) for more information).

Since EqBeats is a regular FastCGI application, you can spawn it the way you want though.

EqBeats's Projects

eqbeats icon eqbeats

a former website for music about horses

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.