Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.
/ hipsterpizza Public archive

allows group orders on pizza.de // ermöglicht Gruppenbestellungen auf pizza.de

License

Notifications You must be signed in to change notification settings

breunigs/hipsterpizza

Repository files navigation

New Pizza.de design and HipsterPizza

Pizza.de have changed their design, which completely breaks HipsterPizza. A rewrite is a lot of effort, especially given the hacks upon hacks and general bad code quality that is HipsterPizza. If someone wants to take over, please contact me and we'll figure it out.

For now, Pizza.de's old design is still available and mostly works fine. The shop selection is a bit whacky, but with a bit of URL guessing you can make it work. The code changes are surprisingly little, see this commit on how to do so: https://github.com/nnev/hipsterpizza/commit/5e4898a8e477495b3f79239830efd5357e8d82f1

It has been a nice ride, thanks everyone! -- Stefan

HipsterPizza

HipsterPizza allows to make group orders on pizza.de.

There is no more public instance available as of ~2016-11-20. You need to roll your own.

Regular user? Roll your own copy to gain the ability to

  • automate all the things
  • save sharing the basket ID with colleagues
  • send your own fax to…
    • easily match order to person
    • add detailed way description
    • get VIP status
    • Bonus: confuse the delivery people

Convinced? Read on!

Status

Build Status Test Coverage Code Climate

Rolling your own copy

Basic Setup

sudo apt-get install ruby git libssl-dev libsqlite3-dev nodejs
sudo gem install bundler

sudo mkdir -p /var/www/
sudo chown www-data:www-data /var/www
cd /var/www

# Install HipsterPizza and its dependencies:
sudo -u www-data -s
  git clone git://github.com/breunigs/hipsterpizza
  cd hipsterpizza

  export DISABLE_SPRING=1
  /usr/bin/bundle --deployment --without development test
  ./bin/rake hipster:setup_production

  RAILS_ENV=production ./bin/rails server -p 10002 -b localhost

HipsterPizza should now be accessible from your browser at http://localhost:10002, give it a spin!

Everything that follows is optional. If you decide that the simple setup is enough for you, you may want to replace localhost with 0.0.0.0 in the startup command. Others can access HipsterPizza using your IP or hostname and the port.

Starting it automatically

using systemd:

sudo cp /var/www/hipsterpizza/docs/systemd/* /etc/systemd/system/
sudo systemctl enable hipsterpizza.service hipsterpizza-cleanup.timer
sudo systemctl start hipsterpizza.service

This will ensure HipsterPizza starts everytime you boot the system. The hipsterpizza-cleanup jobs automatically removes outdated data – this keeps the delivery time estimate decent.

not using systemd:

Execute the following commands as user www-data at appropriate times/events:

cd /var/www/hipsterpizza
RAILS_ENV=production ./bin/rails server Puma -p 10002 -b localhost
RAILS_ENV=production ./bin/rake hipster:purge_old

Webserver integration

If you want HipsterPizza to be accessible “properly”, with a real domain and such, you need to install a webserver to act as reverse proxy.

Caveat: HipsterPizza does not support sub-URIs/sub-directories. I.e. pizza.example.com is fine, while www.example.com/pizza is not.

You can find an example config for nginx in docs/nginx_configuration_example. It’s strongly recommended to use that as a base. Missing config directives can lead to subtle bugs not immediately visible.

Copy the sample to /etc/nginx/sites-available/hipsterpizza and edit the IPv6 address and server name. Add a symbolic link to sites-enabled and reload nginx to apply the changes.

Configuring HipsterPizza to your needs

Once the above setup is done, you should have a public instance of HipsterPizza running, just like the one on pizza.yrden.de.

config/pinning.yml: (see example) Allows you to fixate details you’d need to enter each time when using HipsterPizza’s public instance. You can prefill only some details or lock everything down, depending on your needs. Each config options is documented in the linked example file.

config/fax.yml: (see example) If you order regularly from the same delivery service, you can order by directly sending them a fax (ask them first!). This file allows you to customize address, logos, etc.

Biggest advantage: By including the nicks with each order, matching pizza box to nerd is speed up tremendously. If you register with pdf24.org, you can fax from HipsterPizza’s interface, too. This is the setup we (Heidelberg’s hacker group) use. If the delivery service plays along, this rocks.

About

allows group orders on pizza.de // ermöglicht Gruppenbestellungen auf pizza.de

Resources

License

Stars

Watchers

Forks

Packages

No packages published