Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Tango Translation Database

This is the project that underlies the Tango Translation Database on

I developed it to teach myself Ruby on Rails. Read more about its development on my blog


To deploy a copy of this project, you must follow these steps.


Set up a GCP account and a project and create a GCP compute instance by following the ./terraform/instance/

Env vars

Make sure you export a set of environmental variables (ideally place these into a ~/envvars/ file and source them)

export RAILS_ENV=production
export SECRET_KEY_BASE=<a secret key base>  # The output of rake secret
export GMAIL_USERNAME=<your Gmail username>  # I use
export GMAIL_PASSWORD=<your Gmail password>
export TTDB_PATH=<Where you downloaded the TTDB git repository> # I typically use ~/tangoLyricsDB

Python fabric

To install the components on the server we will be using Python Fabric 1.x (2.x has a very different API)

First we will create a python 2.7 environment:

virtualenv ./venv

source ./venv/bin/activate

pip install --upgrade pip

pip install -r requirements.txt

Then we can run the necessary installation scripts:

./venv/bin/fab -H ubuntu@$(terraform output -state=./terraform/instance/terraform.tfstate ip) deploy

Local setup

Create the relevant docker volumes

docker volume create --name postgres-vol

Precompile assets (you will need ruby and rake to do this), in to provide them with the :

bundle exec rake assets:precompile

Build and run docker-compose thus:

docker-compose build
docker-compose up -d

We can create and restore a specific database:

export BACKUP="TDB_2019-03-03"
docker-compose run app rake db:create
docker exec -i tangolyricsdb_db_1 pg_restore --clean --no-acl --no-owner -U postgres -d tangoLyricsDB_${RAILS_ENV} < ./backup/${BACKUP}.dump


Tango lyrics database written with Ruby on Rails




No releases published


No packages published