== README
= Schengen Calculator
Caclulator to help track the 90/180 day schengen visa rule for travellers in Europe. I had created similar functionality in Excel spreadsheet for my personal use when i was travelling in Europe, and thought it would be helpful for others to put online.
Live site can be found here: http://www.schengen-calculator.com
== System Dependencies
== Application setup To develop locally, rails can be setup normally in the /src folder
bundle install
./bin/rake db:create
./bin/rake db:migrate
./bin/rake db:seed
= After updating seed countries data
./bin/rake db:update_countries
= To clean up guest user accounts up to last week
./bin/rake db:guest_cleanup
./bin/rake db:guest_cleanup["2010-10-01"]
== How to run application and tests (test framework MiniTest
)
rails server
.bin/rake test
== Deployment
To set up a new aws deployment: In aws create the nessessary application paramaters in AWS Paramater Store which are used on deployment to set the lambda environment Variables: RAILS_MASTER_KEY: getParam('rails_master_key'), DB_URL: getParam('db_url'), SECRET_KEY_BASE: getParam('secret_key_base'), FACEBOOK_ID: getParam('facebook_id'), FACEBOOK_SECRET: getParam('facebook_secret'), BREVO_LOGIN: getParam('brevo_login'), BREVO_PASSWORD: getParam('brevo_password'), TASK_PASSWORD: getParam('task_password')
The following secrets are required in github secrets. See aws documentation for setting up a deployment user role with least privileges. One approach: Attempt deploy with no permissions, then add permissions that fail until deploy passes. AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION