Easely find a tasty cocktail to mix.
Visit http://rockstails.herokuapp.com/ to try!
- Run on (J)ruby.
- Build with Sinatra, Haml, Yaml Bootstrap and JQuery.
- Cocktail database in Yaml from Difford's website.
- Install postgres
- Create a rockstails database with a rockstails/pass user.
- run
rake db:migrate db:import_cocktails db:import_bars
rake test
should work.ruby web.rb
(orrackup
) will start the application on http://localhost:4567/
At startup it will autodetect if a database is configured or not (using DATABASE_URL env variable). If not it will use an in-memory databse.
To start Postgres locally on Ubuntu use: sudo systemctl start postgresql.service
To create the user/db for test:
sudo -u postgres createuser rockstails
sudo -u postgres createdb rockstails
sudo -u postgres psql
postgres=# alter user rockstails with encrypted password 'pass';
postgres=# grant all privileges on database rockstails to rockstails ;
rake db:migrate db:import_ingredients db:import_cocktails db:import_bars
To deploy it:
flyctl proxy 15432:5432 -a rockstails-db
DATABASE_URL=postgres://rocktails:<password>@localhost:15432/rockstails rake db:migrate db:import_ingredients db:import_cocktails db:import_bars
fly deploy
Simon Difford's and http://www.diffordsguide.com for his extensive cocktail database (but messy site).