The MDme app is currently setup to run on rails 4.2.4 powered by Ruby 2.2.3 Before running for the first time several files must be created
-
config/email_config.rb
-
config/api_keys.rb
-
config/encryption_keys.yml
Test files have examples included such as email_config_example.rb
. The contents of these files can be copied entirely to get the app running, but you will need the proper API keys if you are planning to send emails, use google services, etc.
Development and test environemnts use sqlite3 and require a copy installed on the host machine. Production currently is run on Heroku and uses postgreSQL. You should not need to install postgreSQL to get things running locally.
Front end is powered by AngularJS and additional libraries. You will need to run rake bower:install
to have bower retreive the librariesand store where sprockets can find them.
If using any image uploading features of MDme it is required that ImageMagick is installed to allow for modifying/resizing the raw image uploaded. ImageMagick can be found here www.imagemagick.org
Because this app runs on multiple subdomains it cannot be accessed simply by 127.0.0.1 The routes are bound to www, admin, or doctors subdomains; in production a blank subdomain reroutes to www. Therefore you will need to edit your host file to include a domain with those subdomains pointing at 127.0.0.1:3000
in order to access the development server.
The database schema should be ready after running rake db:migrate
To load sample data, you can run rake db:populate
. Running rake db:populate_appointments
will add additional appointments spanning the next 3 days. You may want to comment out the line in config/environments/development.rb config.action_mailer.delivery_method = :letter_opener
before running rake db:populate
to prevent a confirmation email page opening for each user created.
The MDme repo has an extensive rspec 3.x testing suite. In order to test the site across multiple subdomains (www, admin, and doctors) it uses mdme.tk:7171 as a test host url. You will likely have to add this domain to your host file, as well as www.mdme.tk admin.mdme.tk and doctors.mdme.tk to point at 127.0.0.1 If you run the test suite after cloning and something fails please contact Matt Hamada (ermacaz@gmail.com). I only have one development machine so things may break on other machines/environments.
Please fork a new branch off of master to make modifications/additions. Make sure all additions are covered with rspec tests. Submit a pull request for your branch. Once I check it out and it all looks good I will merge to master.
The production app is currently hosted on heroku. There is a specific branch, production, that is used for pushing. This branch is not kept on github since it has sensitive info. Commits should rarely be made to production; rather you should merge master to production when ready to deploy. The main exception is when adding sensitive info like api keys, or embed full Urls to mdme.us. When deploying to production use git push heroku production:master