Skip to content
/ lunch Public

containerized daily menu scraper and visualizer

Notifications You must be signed in to change notification settings

europ/lunch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lunch

Daily menu scraper and visualizer built on top of ruby on rails hosted in a container behind a reverse proxy container provided by nginx.

Schema

schema.png

Setup

Server

Instructions how to host this multicontainer application on a server with a specific domain name including SSL certificates.

Prerequisities

Instructions

  1. configure enviroment
    1. run cp .env.example .env
    2. add your domain name to .env file
  2. add your SSL certificate files to proxy/certs/
    • add your CRT file as lunch.crt(proxy/certs/lunch.crt)
    • add your KEY file as lunch.key(proxy/certs/lunch.key)
  3. build the application via docker-compose build
  4. start the application via docker-compose up -d

Local

Instructions how to launch locally rails application only.

Prerequisities

It is recommended to use rbenv/rbenv with rbenv/ruby-build.

For instructions using docker-compose:

software version
docker 19.03.13
docker-compose 1.26.1

For instructions using ruby:

software version
ruby 2.7.1
gem 3.1.2
bundle 2.1.4
rails 6.0.3.3

Instructions

Using docker-compose:

  1. run docker-compose up -d lunch
  2. find the container's IP address via docker inspect lunch | sed -nr 's/^\s*"IPAddress": "([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)",$/\1/p'
  3. visit http://IP:3000

Using ruby:

  1. change directory to lunch via cd lunch
  2. install dependencies via bundle install
  3. start the application via bundle exec rails server
    • to specify custom IP address use -b <IP>
    • to specify custom port number use -p <NUM>
  4. visit http://localhost:3000