LilyPond mini-score engraving and sharing service for musicians.
The live Tunefl service is at tunefl.com.
More sleep lost by tiredpixel.
The primary method of development installation is using Docker. You can also use this as a basis for production installation, but you'll probably want to change some things, if so.
You can also install manually, by installing the linked services and packages
defined in Dockerfile & Dockerfile.worker, using bundle install, and
running services using the supplied Procfile.
The default Ruby version supported is defined in .ruby-version.
Any other versions supported are defined in .travis.yml.
Various versions will probably work. I'm currently using:
# docker --version
Docker version 1.9.1, build a34a1d5
# docker-compose --version
docker-compose version 1.5.2, build 7240ff3Note that --x-networking will no longer be preview in Docker Compose 1.6, so
this flag might not be necessary for you.
Copy and configure your settings:
cp .env.example .envStart the postgres service:
docker-compose --x-networking up -d postgresConnect using psql:
docker exec -it tunefl_postgres_1 psql -U postgresCreate the database:
CREATE ROLE tunefl_dev LOGIN PASSWORD 'password';
CREATE DATABASE tunefl_dev OWNER tunefl_dev;Start the web service:
docker-compose --x-networking up -d webMigrate the database:
docker exec tunefl_web_1 bundle exec rake db:migrateStop all services:
docker-compose stopStart all services:
docker-compose --x-networking upOpen the web service in a browser:
xdg-open "http://$(docker-compose port web 8080)"Open the web service admin area in a browser:
xdg-open "http://$(docker-compose port web 8080)/admin"Monitor the queue using Sidekiq Spy:
docker exec -it tunefl_worker_1 sh \
-c 'TERM=xterm bundle exec sidekiq-spy -h tunefl_redis_1.tunefl -n resque'Create multiple stacks as required; the main one in installation is suitable for
a dev stack, and you can build on this. You'll probably also want to create a
test stack, following similar steps. One approach is to:
Add an alias to your shell; for Bash:
echo "alias docker-compose-stack='docker-compose -f docker-compose.\$STACK.yml -p \$STACK'" >> ~/.bashrc
source ~/.bashrcCopy and configure a different settings file (here I'm using 0 as a separator
as Docker Compose currently strips -_.):
cp .env.example .tunefl0test.envCopy the Docker Compose file, modifying to point to your .tunefl0test.env:
cp docker-compose.yml docker-compose.tunefl0test.ymlThereafter, execute docker-compose commands using docker-compose-stack. I
prefer to be explicit and use a subshell, as a protection against forgetting
which stack I'm using; e.g. to start all services:
(export STACK=tunefl0test; docker-compose-stack up)To run all tests:
docker exec tunefl0test_web_1 bundle exec rspecTests are written using RSpec. There are not many tests, because the application is very simple. If generating a score from the home page works, then things are probably okay.
You can become a watcher on GitHub. And you can become a stargazer if you are so minded. :D
Contributions are welcome! Please fork the repository and prepare your patches
in one or more branches, ensuring that any tests are not broken by the changes.
Then, send me one or more pull requests. Proposed patches will then be reviewed
prior to acceptance, usually into master branch.
If you'd like to discuss something, then please get in touch.
Do whatever makes you happy. We'll probably still like you. :)
May you find peace, and help others to do likewise.
Copyright © 2012-2016 tiredpixel.
See LICENSE.txt.