Skip to content website
Branch: master
Clone or download
RobLoach Merge pull request #330 from Faalagorn/patch-2
Update link to Steam profile
Latest commit 8bdd475 Mar 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bundles Minor cleanup Feb 19, 2019
common Minor cleanup Feb 19, 2019
frontend Move installer documentation to a fixed position Feb 27, 2019
lutrisweb Add missing settings Feb 27, 2019
public Add better instructions for syncing Steam profile (Closes #310) Feb 26, 2019
runners Formatting Feb 6, 2019
templates Utilized Steam's "my" alias Mar 13, 2019
thegamesdb Implement version of slugify that supports japanese characters May 25, 2018
.gitignore Ignore GOG cache folders Dec 13, 2018
.jscsrc Improve frontend builds Sep 21, 2014
.travis.yml travis: Disable email notifications Aug 20, 2018
Dockerfile Switch pip to pip3 Feb 27, 2019
Gruntfile.js Design the homepage content Jan 29, 2019
README.rst Use npm scripts to avoid globals Oct 30, 2017
bower.json Clean remote before pulling git changes Feb 20, 2019 Start porting to Python3 May 9, 2017
package-lock.json Remove jcrop from the project Dec 4, 2018
package.json Add REST Swagger and Webpack loader Nov 12, 2018


Getting the site up and running for development

With docker

Install docker for your system.

Build the image

docker build -t lutris/website .

Start a new container using the image

docker run --name lutrisweb -it -p 8000:8000 lutris/website

Attach to shell

docker start lutrisweb
docker exec -it lutrisweb /bin/bash


If you haven't done it already, install and configure virtualenvwrapper. If you are unfamiliar with virtualenvwrapper, see their documentation on their website:

mkvirtualenv lutrisweb
cd lutrisweb

Once the virtualenv is created, you need to make sure that some environment variables are exported and are set to valid values, the simplest way to achieve that is to edit the postactivate script in $VIRTUAL_ENV/lutrisweb/bin/postactivate and add your exports here. The only required environment varible is the DJANGO_SETTINGS_MODULE one:

export DJANGO_SETTINGS_MODULE="lutrisweb.settings.local"

Optionnaly, if you don't want to setup a PostgreSQL database, you can also tell the project to fallback to SQLite:

export USE_SQLITE=1

Once your virtualenv is created, you can install the system and python dependencies:

sudo apt-get install imagemagick memcached libmemcached-dev libxml2-dev libxslt1-dev mercurial bzr python-dev
make deps

In order to build the frontend code (javascript and css files), you'll need nodejs and npm installed on your system. If you are running Ubuntu, it is advised to use nvm to get the most recent version of node, you can install it following the instructions on the github page

Once you installed a recent version of npm, you can run the following commands:

make setup  # Will install the project's npm and bower dependencies
            # and build the static files
make watch  # Watch for JS/CSS changes and compile them

You'll need to setup the database, if you want to use a PostgreSQL database, follow the instructions found in the next paragraph before running this command. The database setup will also create a superuser account with the credentials admin/admin:

make db

The installer scripting documentation is not shipped with the website but with the client, if you want to build the docs, you'll need to get the client and compile the rst files into HTML. All this process is automated:

make client
make docs

Once everything is set up correctly, you should be able to run the test suite without any failures:

make test

You can now start developing on the website. Open your favorite editor and run Django's internal web server:

make run

Postgresql configuration


sudo -u postgres psql
create user lutris;
create database lutris with owner lutris;
alter user lutris createdb;
alter database lutris owner to lutris;
alter user lutris with password 'admin';

Create a user:

sudo -u postgres create user lutris

Note that the user will need to be able to create databases in order to run tests. If you have created an user without this permission, run:

sudo -u postgres psql

Creating a database:

sudo -u postgres psql
create database lutris with owner lutris;

or (in shell):

createdb lutris -O lutris

Modify database's owner:

sudo -u postgres psql
alter database lutris owner to lutris;

Change user's password:

sudo -u postgres psql
alter user lutris with password 'admin';

Dropping all tables from the database:

drop schema public cascade;
create schema public;

Backing up the database:

pg_dump lutris > lutris.sql

Restoring a backup:

psql lutris < lutris.sql

To automate backups, make sure the Unix user has superuser privileges on PostgreSQL and run this script with cron:

cd /srv/backup/sql
backup_file="lutris-$(date +%Y-%m-%d-%H-%M).tar"
pg_dump --format=tar lutris > $backup_file
gzip $backup_file
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.